Пример #1
0
 public override void OnCollision(CollisionEvent collisionEvent)
 {
     // Collision with door -> change scene if enought coins
     if (collisionEvent.OtherEntity.GetName().Equals("Player") && Player1Script.Instance.GetCoins() == 5)
     {
         _actionManager.ActionChangeCurrentScene(_actionManager.ActionGetCurrentSceneIndex() + 1);
     }
 }