protected void initalize() { if (isInit) { return; } isInit = true; if (CanRun) { state = MinionState.moving; GameObject player = GameSharedData.GetPlayerNumberNext(_unit_ID, 1); SetGoal(player.transform); } minionSoundControler.PlaySound(MinionAction.spawn); setMaterial(); setHealthBarMaterial(); particleControler = transform.FindChild("Particles").GetComponent <MinionParticlesController>(); }
protected void initalize() { if (isInit) { return; } isInit = true; if (CanRun) { state = MinionState.moving; GameObject player = GameSharedData.GetPlayerNumberNext(_unit_ID, 1); SetGoal(player.transform); } minionSoundControler.PlaySound(MinionAction.spawn); setMaterial(); setHealthBarMaterial(); particleControler = transform.FindChild("Particles").GetComponent<MinionParticlesController>(); }