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