Draft
Conversation
|
Play this branch at https://play.threadbare.game/branches/endlessm/abilities-prototypes/. (This launches the game from the start, not directly at the change(s) in this pull request.) |
6c335a0 to
0f013fe
Compare
Similar to the "hookable" layer. To make the repel mechanic a bit more generic. Update the enum and the references in eldrune StoryQuest.
Otherwise adding a RigidBody2D to the scene, the bodies go down until they hit a wall. Setting the default gravity to zero, the object looks like it's on the ground.
31d9bd2 to
2b85c96
Compare
That has a got_repelled() method. So far we've been assuming a Projectile node for the on_body_entered handler of the Repel area. But the Area2D.body_entered signal is sent with the body: Node2D parameter (which in reality can be a PhysicsBody2D or a TileMap). So use duck typing and also rename the expected method to "got_repelled". Also, call it with the direction of the repel. Previously the Player was passed and the repel direction was calculated on the called node. This makes the repel ability more generic. Also adapt the eldrune_projectile.gd script.
12a60c1 to
fd2f9c8
Compare
Pressing the Test button was failing with: ``` Invalid access to property or key 'device_index' on a base object of type 'Node (input_helper.gd)'. ``` And in any case, the vibration of the joypad while working in the editor is not desired.
And show warning in the editor when the target is not set.
fd2f9c8 to
a7e99a6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The repel mechanic was initially intended for the ink blobs, then to any projectile. But we can now consider a repel action that affects more game elements.
Helps #2059