Exemple #1
0
        protected override void OnCollisionWith <T> (T component)
        {
            Pushable pushable = component as Pushable;

            if (pushable != null)
            {
                OnCollisionWithPushable(pushable);
            }
        }
        protected override void OnCollisionWith <T> (T component)
        {
            Pushable pushable = component as Pushable;

            if (pushable)
            {
                pushable.Push(Direction);
            }
        }
Exemple #3
0
 private void OnCollisionWithPushable(Pushable pushable)
 {
     if (!Pushing)
     {
         BraceForPush();
     }
     else
     {
         Push(pushable);
     }
 }
Exemple #4
0
 public void Push(Pushable pushable)
 {
     pushable.Push(Direction);
     Idle();
 }