Esempio n. 1
0
    void WaitForArrowOut()
    {
        Vector3 pos = general.transform.localPosition + posOffset;
        string  shenGuiLuanWuName = "";

        switch (step)
        {
        case 0:
            pos -= posOffset;
            shenGuiLuanWuName = shenGuiLuanWuName1;
            if (Mathf.Abs(general.transform.localPosition.x - enemyGeneral.transform.localPosition.x) < 200)
            {
                general.SetOnMagic(5);

                enemyGeneral.OnDamage(20, -1, false);
            }
            else
            {
                Invoke("WaitForMagicOver", 0.5f);
            }
            break;

        case 1:
            shenGuiLuanWuName = shenGuiLuanWuName2;
            general.SetOnMagic(4);
            enemyGeneral.OnDamage(10, -1, false);
            break;

        case 2:
            shenGuiLuanWuName = shenGuiLuanWuName3;
            general.SetOnMagic(5);
            enemyGeneral.OnDamage(10, -1, false);
            break;

        case 3:
            shenGuiLuanWuName = shenGuiLuanWuName2;
            general.SetOnMagic(4);
            enemyGeneral.OnDamage(10, -1, false);
            break;

        case 4:
            shenGuiLuanWuName = shenGuiLuanWuName4;

            Invoke("WaitForMagicOver", 0.5f);
            break;
        }

        GameObject go = InstantiateOneGO(shenGuiLuanWuName, pos, scale, WarSceneController.manEulerAngles);

        go.GetComponent <MagicShenGuiLuanWuAct>().SetInfo(speed);

        InstantiateOneGO(explodeName, enemyGeneral.transform.localPosition, Vector3.one, Vector3.zero);

        step++;
    }
Esempio n. 2
0
    void WaitForCameraMoveToGeneral()
    {
        fenShenZhanGO = (GameObject)GameObject.Instantiate(Resources.Load("Magic/" + group[2]));
        general.SetOnMagic(5);

        Invoke("WaitForArrowOut", 0.3f);
    }