Esempio n. 1
0
 private void Awake()
 {
     //playerAtk = GetComponent<PlayerAtk>();
     playerLocomotion = GetComponent <PlayerLocomotion>();
     playerStats      = GetComponent <PlayerStats>();
     playerAtk        = GetComponent <PlayerAtk>();
 }
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else if (instance != this)
     {
         Destroy(gameObject);//only one exist
     }
 }
 private void Start()
 {
     anim      = GetComponent <Animator>();
     playerAtk = GetComponent <PlayerAtk>();
 }
Esempio n. 4
0
 private void Start()
 {
     controller  = GetComponent <CharacterController>();
     playerStats = GetComponent <PlayerStats>();
     playerAtk   = GetComponent <PlayerAtk>();
 }
Esempio n. 5
0
 // Use this for initialization
 void Awake()
 {
     instance = this;
 }