void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
예제 #2
0
    private void EndLevelHandler()
    {
        _previousRoom = _currentRoom;

        if (++_currentRoomIndex >= _rooms.Count)
        {
            PlayerWin?.Invoke();
        }
        else
        {
            RoomChange(_currentRoomIndex);
        }
    }
예제 #3
0
 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;
 }
예제 #4
0
        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>();
 }
예제 #6
0
 public static void OnPlayerWin()
 {
     PlayerWin?.Invoke();
 }
예제 #7
0
 public void OnPlayerWin(EventArgs e)
 {
     PlayerWin?.Invoke(this, e);
 }