Example #1
0
        // Use this for initialization
        void Start()
        {
            if (!uiExists)
            {
                uiExists = true;
                DontDestroyOnLoad(transform.gameObject);
            }
            else
            {
                Destroy(gameObject);
            }

            playerStatManager   = GetComponent <PlayerStatManager>();
            playerHealthManager = FindObjectOfType <PlayerHealthManager>();
        }
Example #2
0
 // Use this for initialization
 void Start()
 {
     playerStatManager = FindObjectOfType <PlayerStatManager>();
 }
Example #3
0
 // Use this for initialization
 void Start()
 {
     CurrentHealth     = MaxHealth;
     myStatus          = gameObject.GetComponent <EnemyStatusManager>();
     playerStatManager = FindObjectOfType <PlayerStatManager>();
 }
Example #4
0
 // Use this for initialization
 void Start()
 {
     enemyRigidBody    = GetComponent <Rigidbody2D>();
     playerStatManager = FindObjectOfType <PlayerStatManager>();
 }