예제 #1
0
 // deaktivuje penguina a postaví jen na konkrétní místo
 private void DeactivatePenguin(PenguinController pPenguin, Vector3 pPosition)
 {
     pPenguin.SetPhysics(false);
     pPenguin.SetPenguinInPlaying(false);
     pPenguin.transform.position = pPosition;
     penguinsFront.Add(pPenguin);
 }
예제 #2
0
 private void ActivatePenguin(PenguinController pPenguin)
 {
     pPenguin.transform.position = startPoint.position;
     pPenguin.SetPhysics(true);
     pPenguin.SetPenguinInPlaying(true);
     penguinsFront.Remove(activePenguin);
     OnNewPenguinOnStart.Penguin = pPenguin;
     OnNewPenguinOnStart.Raise();
 }
예제 #3
0
        private void FireStart()
        {
            if (activePenguin == null)
            {
                return;
            }

            activePenguin.SetPhysics(true);
            fireIndicator.Activate(activePenguin.transform.position);
            touchStartPos = Camera.main.WorldToScreenPoint(activePenguin.gameObject.transform.position);
        }
예제 #4
0
        // provede prijetí penguina na savepoint
        public void OnPenguinInSavePoint(PenguinController pPenguin)
        {
            if (pPenguin == currentPenguin)
            {
                return;
            }

            pPenguin.MovingStoped(isFinish
                                ? PenguinController.EPenguinState.Survived
                                : PenguinController.EPenguinState.SavePoint);

            pPenguin.SetPhysics(false);
            MovePenguinOnSaveArea(pPenguin.gameObject.transform);
            currentPenguin = pPenguin;
        }