상속: MonoBehaviour
예제 #1
0
 private void Awake()
 {
     gameMaster = GameObject.FindGameObjectWithTag("GM").GetComponent <GameMaster>();
     gameOver   = GameObject.FindGameObjectWithTag("GO").GetComponent <GameOverSystem>();
     weeds      = GameObject.FindGameObjectWithTag("Spawner").GetComponent <WeedsSpawnSystem>();
     player     = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerController>();
 }
예제 #2
0
 private void Awake()
 {
     weeds     = GameObject.FindGameObjectWithTag("Spawner").GetComponent <WeedsSpawnSystem>();
     player    = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerController>();
     gameOver  = GameObject.FindGameObjectWithTag("GO").GetComponent <GameOverSystem>();
     cutnRun   = GameObject.FindGameObjectWithTag("CD").GetComponent <CutnRunSystem>();
     countDown = GameObject.FindGameObjectWithTag("CD").GetComponent <CountDownSystem>();
 }
예제 #3
0
 public GameOverSystem GameOverSystem()
 {
     gameOverSystem = GameObject.Find("EventSystem").GetComponent <GameOverSystem>();
     if (gameOverSystem == null)
     {
         Debug.Break();
         throw new MissingComponentException("GameOverSystem" + errorString);
     }
     return(gameOverSystem);
 }
    private void Awake()
    {
        gameMaster = GameObject.FindGameObjectWithTag("GM").GetComponent <GameMaster>();
        gameOver   = GameObject.FindGameObjectWithTag("GO").GetComponent <GameOverSystem>();

        foreach (bool isActive in gameMaster.skillActive)
        {
            if (isActive == true)
            {
                hasAbility = true;
                return;
            }
        }

        if (!hasAbility)
        {
            gameMaster.haveSkill[1]   = true;
            gameMaster.skillActive[1] = true;
        }
    }
    void OnTriggerEnter2D(Collider2D other)
    {
        // Check the provided Collider2D parameter other to see if it is tagged
        // "PickUp", if it is...

        if (other.gameObject.CompareTag("Player"))
        {
            if (observerCount == 0)
            {
                observed.first += 1;
            }
            observerCount++;
        }
        else if (other.gameObject.CompareTag("Portal"))
        {
            alertObj.SetActive(false);
            Debug.Log("Game Over, man, Game Over");
            GameOverSystem.GameOver();
        }
    }
 private void Awake()
 {
     gameOver   = GameObject.FindGameObjectWithTag("GO").GetComponent <GameOverSystem>();
     weeds.mute = true;
     timeLeft   = maxTime;
 }
예제 #7
0
 private void Awake()
 {
     gameOver = gameObject.GetComponent <GameOverSystem>();
 }
 private void Awake()
 {
     gameOver         = gameObject.GetComponent <GameOverSystem>();
     playerController = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerController>();
 }
예제 #9
0
 private void Awake()
 {
     player   = GameObject.FindGameObjectWithTag("Player").GetComponent <SlashSystem>();
     gameOver = GameObject.FindGameObjectWithTag("GO").GetComponent <GameOverSystem>();
 }
예제 #10
0
 void Awake()
 {
     currentHealth  = maxHealth;
     animator       = GetComponent <Animator>();
     gameOverSystem = GetComponent <GameOverSystem>();
 }
예제 #11
0
 // Use this for initialization
 void Start()
 {
     goSystem   = this;
     isGameOver = false;
 }
 private void Awake()
 {
     gameOver         = GameObject.FindGameObjectWithTag("GO").GetComponent <GameOverSystem>();
     occupiedSpawnPos = new List <Vector3>();
 }