void Awake() { if (instance == null) { instance = this; } }
private void EndLevelHandler() { _previousRoom = _currentRoom; if (++_currentRoomIndex >= _rooms.Count) { PlayerWin?.Invoke(); } else { RoomChange(_currentRoomIndex); } }
void Awake() { myShield.SetActive(false); player = GameObject.FindGameObjectWithTag("Player"); bizarro = GameObject.FindGameObjectWithTag("Bizarro"); bloodEffect = (GameObject)Resources.Load("Effects/Special/MobBeating"); playerWin = player.GetComponent <PlayerWin>(); gameManager = GameObject.FindGameObjectWithTag("GM").GetComponent <GameManager>(); playerMove = player.GetComponent <PlayerMovement>(); myOffset = transform.position - bizarro.transform.position; myOffset.z = 0; myCollider.SetActive(false); moveForce = playerMove.moveForce; maxSpeed = playerMove.maxSpeed; }
public void PointsCount() { var nPoint = gs.GetNpcPoints(); var pPoint = gs.GetPlayerPoints(); var choosedScore = gs.GetChoosedScore(); if (nPoint == choosedScore) { NpcWin win = new NpcWin(); win.Show(); gs.StartNewGame(); } if (pPoint == choosedScore) { PlayerWin win = new PlayerWin(); win.Show(); gs.StartNewGame(); } }
// Use this for initialization void Start() { pw = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerWin>(); }
public static void OnPlayerWin() { PlayerWin?.Invoke(); }
public void OnPlayerWin(EventArgs e) { PlayerWin?.Invoke(this, e); }