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

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

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