예제 #1
0
 void Awake()
 {
     // Initialization.
     _defaultHP = hp;
     _enemySpriteAnim = GetComponentInChildren<EnemyMoveSpriteAnimation>();
     _scoreManager = GameObject.Find("Game Manager").GetComponent<UIScoreManager>();
 }
예제 #2
0
 void Awake()
 {
     UIScoreManager = GameObject.Find("pepperUIBoard").GetComponent <UIScoreManager>();
     if (UIScoreManager == null) // if UIScoreManager is missing
     {
         Debug.LogError("UIScoreManager component missing from this gameobject");
     }
 }
예제 #3
0
 void Awake()
 {
     // Initialization.
     _spawnManager = GameObject.Find(_gameManagerString).GetComponent<EnemySpawnManager>();
     _scoreManager = GameObject.Find(_gameManagerString).GetComponent<UIScoreManager>();
     _sprite = GetComponent<SpriteRenderer>();
     _defaultHP = hp;
 }
예제 #4
0
    //initializing
    void Awake()
    {
        fishSound = gameObject.GetComponent <AudioSource>();
        if (fishSound == null)
        { // if AudioSource is missing
            Debug.LogWarning("AudioSource component missing from this gameobject. Adding one.");
            //let's just add the AudioSource component dynamically

            fishSound = gameObject.AddComponent <AudioSource>();
        }
        pan              = GameObject.FindWithTag(panTag);
        fishManager      = GameObject.FindWithTag(fishManagerTag);
        lastHeightOffset = 0.0f;
        task2            = GameObject.Find(taskName).transform;
        plate            = GameObject.FindWithTag(plateTag);
        UIScoreManager   = GameObject.Find("fishUIBoard").GetComponent <UIScoreManager>();
        if (UIScoreManager == null) // if UIScoreManager is missing
        {
            Debug.LogError("UIScoreManager component missing from this gameobject");
        }
    }
예제 #5
0
 void Awake()
 {
     _animator = GetComponent<Animator>();
     _scoreManager = GameObject.Find("Game Manager").GetComponent<UIScoreManager>();
     _playerFire = GetComponent<PlayerFire>();
     _playerImmortal = GetComponent<PlayerImmortalEffect>();
 }
예제 #6
0
 void OnEnable()
 {
     if (_instance == null)
         _instance = this;
 }