public void InitTankFalling(NodeAddedEvent evt, ActivatedTankNode tank) { Entity entity = tank.Entity; TankFallingComponent component = new TankFallingComponent(); TrackComponent track = tank.track; TankCollisionComponent tankCollision = tank.tankCollision; component.PreviousCollisionContactsCount = this.GetCollisionContacts(tankCollision); component.PreviousTrackContactsCount = this.GetTrackContacts(track); component.IsGrounded = true; component.PreviousVelocity = Vector3.zero; entity.AddComponent(component); }
public void SetNewAnimationAsNotPrepared(NodeAddedEvent evt, [Combine] AnimationNode animationNode, [Context, JoinByTank] ActivatedTankNode tank) { animationNode.Entity.AddComponent <AnimationPreparedComponent>(); }
public void DisableTankFalling(NodeRemoveEvent evt, ActivatedTankNode tank) { tank.Entity.RemoveComponentIfPresent <TankFallingComponent>(); }