コード例 #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>();
    }