예제 #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
파일: Minions.cs 프로젝트: tentacode/cabala
    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>();
    }