// 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); }
private void ActivatePenguin(PenguinController pPenguin) { pPenguin.transform.position = startPoint.position; pPenguin.SetPhysics(true); pPenguin.SetPenguinInPlaying(true); penguinsFront.Remove(activePenguin); OnNewPenguinOnStart.Penguin = pPenguin; OnNewPenguinOnStart.Raise(); }
private void FireStart() { if (activePenguin == null) { return; } activePenguin.SetPhysics(true); fireIndicator.Activate(activePenguin.transform.position); touchStartPos = Camera.main.WorldToScreenPoint(activePenguin.gameObject.transform.position); }
// 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; }