Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 public void SetNewAnimationAsNotPrepared(NodeAddedEvent evt, [Combine] AnimationNode animationNode, [Context, JoinByTank] ActivatedTankNode tank)
 {
     animationNode.Entity.AddComponent <AnimationPreparedComponent>();
 }
Ejemplo n.º 3
0
 public void DisableTankFalling(NodeRemoveEvent evt, ActivatedTankNode tank)
 {
     tank.Entity.RemoveComponentIfPresent <TankFallingComponent>();
 }