void Awake() { _col = GetComponent <CapsuleCollider>(); _stat = GetComponent <CSoldierStat>(); _anim = GetComponent <CSoldierAnimation>(); _playerManager = GameObject.Find("Manager").GetComponent <CPlayerManager>(); }
//1////////////////////////////////// void GetUnit(GameObject unit) { _stat = unit.GetComponent <CSoldierStat>(); _unit = unit; UpdateData(); if (_stat._maxHp == _stat._hp) { _requireGoldText.text = "0"; } else { _requireGoldText.text = ((_stat._maxHp - _stat._hp) * 2).ToString(); } if (_unit.name.Equals("Player")) { _destroyButton.SetActive(false); } else { _destroyButton.SetActive(true); } _logText.text = ""; }
private void Awake() { _stat = GetComponent <CSoldierStat>(); _anim = GetComponent <CSoldierAnimation>(); }
void Awake() { _stat = GetComponent <CSoldierStat>(); }
private void Awake() { _animator = GetComponent <Animator>(); _stat = GetComponent <CSoldierStat>(); }
private void Awake() { _cc = GetComponent <CharacterController>(); _stat = GetComponent <CSoldierStat>(); _anim = GetComponent <CSoldierAnimation>(); }
int targetNum; //공격할 적 번호 void Awake() { _stat = GetComponent <CSoldierStat>(); _anim = GetComponent <CSoldierAnimation>(); _shoot = GetComponent <CSoldierShoot>(); }