KucherenkoSerhiy / Microworld

4 stars 0 forks source link

Stick ability #5

Closed adriaaula closed 6 years ago

adriaaula commented 6 years ago

This is enemy specific, since the counterpart (when the P2 controlls the enemy) will be the WallJump ability, one of the special abilities of the specific enemy type.

It is already implemented by Sergio, it is just necessary to convert it to the new structure.

scastlara commented 6 years ago

I understand that the "Stick Ability" only includes the "I will stick to you and impede your movement" of it, and not the "I will transform myself into an enemy spawner".

AdriaPerezCulubret commented 6 years ago

Yes, you understand correctly.

adriaaula commented 6 years ago

Yes, although If we consider that both abilities are the ones from that specific enemy, they could come together.

The thing is that when we talked about this, we said that we could define one ability, used both by the P2 (through controllers when possesed) and from the enemy.

But since the enemy will have quite a different behavior (since the ability will be designed to be used when a player is playing), maybe we can have an specific Ability useful for the enemy, in which it works slightly similar// slightly different than the one from the P2.

For example this: Walljump for P2, since it is able to stick to the walls through one key, and StickEnemy, only able to stick to the players or other creatures, and reproducing by hurting the creatures.

KucherenkoSerhiy commented 6 years ago

Abilities are designed to be used independentely of environment. For deciding WHEN, use control class that can represent as player as bot

adriaaula commented 6 years ago

Ok, this is a topic we should discuss next time we meet.

scastlara commented 6 years ago

New branch "feature/stick-ability".

As of now, StickAbility changes the MoveSpeed of Stickable objects upon collision, by dividing it by StickAbilityArgs.SlowingFactor. A boolean StickAbilityArgs.IsSticked is set to true, to avoid sticking to more than one object at a time.

The "only" thing missing is that the Object with the StickAbility has to change its behaviour in some way, to assure that it remains "sticked" to the colliding object. Doing this is not trivial, and I might need some guidance.

Cheers.