void Awake() { unit = gameObject.GetComponent <UnitCreep>(); if (unit == null) { return; } if (animationAttack != null) { unit.SetAttackAnimation(animationAttack); } if (animationIdle != null) { unit.SetIdleAnimation(animationIdle); } if (shootObject != null) { ObjectPoolManager.New(shootObject, 2); } UpdateShootPointNBarrelObj(); }
void Awake() { unit=gameObject.GetComponent<UnitCreep>(); if(unit==null) return; if(animationAttack!=null) unit.SetAttackAnimation(animationAttack); if(animationIdle!=null) unit.SetIdleAnimation(animationIdle); if(shootObject!=null) ObjectPoolManager.New(shootObject, 2); }