void Awake() { unitPathFinding = GetComponent <UnitPathFinding> (); buffer = GetComponent <ActionBuffer> (); aManager = GetComponent <AbilityManager> (); rangeState = RangeFromPlayer.OUTOFRANGE; }
void Awake() { renderers = GetComponentsInChildren <SkinnedMeshRenderer> (); unitPathFinding = GetComponent <UnitPathFinding> (); unitCountUI = (Instantiate(unitCountCanvasPrefab) as GameObject).GetComponent <UnitCountUI>(); unitCountUI.transform.SetParent(transform, true); unitCountUI.transform.localPosition = new Vector3(0, unitCountCanvasPosY, unitCountCanvasPosZ); animator = GetComponentInChildren <Animator> (); bloodParticles = DataBase.instance.GetVisualEffect(DataBase.instance.gameData.bloodParticleName); bloodParticles = Instantiate(bloodParticles) as GameObject; bloodParticles.transform.parent = bloodParticlesSlot.transform; bloodParticles.transform.localPosition = Vector3.zero; bloodParticles.transform.localRotation = Quaternion.identity; bloodParticles.SetActive(false); }