Пример #1
0
    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>();
    }
Пример #2
0
    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>();
    }