Exemple #1
0
    void WaitForCameraMoveToGeneral()
    {
        if (side == WarSceneController.WhichSide.Left)
        {
            warCtrl.SetCameraMoveTo(cameraPosLeft);
        }
        else
        {
            warCtrl.SetCameraMoveTo(cameraPosRight);
        }

        Invoke("WaitForMoveToJuShi", 0.3f);
    }
Exemple #2
0
    IEnumerator ShowTornado()
    {
        for (int i = 0; i < listTornado.Count; i++)
        {
            Vector3 pos = listTornado[i].transform.localPosition;
            pos.y -= 30;
            warCtrl.SetCameraMoveTo(pos);

            yield return(new WaitForSeconds(0.3f));

            listTornado[i].SetActive(true);

            Rect region = new Rect();
            region.x      = listTornado[i].transform.localPosition.x - 50;
            region.y      = listTornado[i].transform.localPosition.y - 50;
            region.width  = 100;
            region.height = 100;

            warCtrl.OnMagicHitChecking(side, MagicController.Instance.GetMagicAttack(), region, false);

            yield return(new WaitForSeconds(0.3f));
        }

        Invoke("WaitForMagicOver", 1.5f);

        if (listTornado.Count < 3)
        {
            SoundController.Instance.PlaySound("00007");
        }
        else
        {
            SoundController.Instance.PlaySound("00008");
        }
    }
Exemple #3
0
    IEnumerator ShowSwordDown()
    {
        for (int i = 0; i < level; i++)
        {
            Vector3 pos = listSwordDownMain[i].transform.localPosition;
            pos.y -= 30;
            pos.y  = Mathf.Clamp(pos.y, -WarSceneController.cameraPosMaxY, WarSceneController.cameraPosMaxY);
            pos.z  = 0;
            warCtrl.SetCameraMoveTo(pos);

            for (int j = 0; j < 8; j++)
            {
                listSwordDown[i * 8 + j].SetActive(true);
                if (j % 2 == 0)
                {
                    yield return(new WaitForSeconds(0.05f));
                }
                if (j == 4)
                {
                    listSwordDownMain[i].SetActive(true);
                }
            }

            yield return(new WaitForSeconds(1f));
        }

        Invoke("WaitForMagicOver", 1);
    }
Exemple #4
0
    void WaitForCameraMoveToGeneral()
    {
        Vector3 pos = listStones[0].transform.localPosition;

        pos.y = -30;
        warCtrl.SetCameraMoveTo(pos);

        StartCoroutine(ShowStones());
    }
    public void SetMagic(int no, WarSceneController.WhichSide side)
    {
        info = MagicManager.Instance.GetMagicDataInfo(no);

        warCtrl.OnResumeGame();
        WarSceneController.state = WarSceneController.State.Magic;

        this.side = side;
        if (side == WarSceneController.WhichSide.Right)
        {
            enemySide = WarSceneController.WhichSide.Left;
            magicShow.magicInfo.SetInfo(info);

            warCtrl.rightGeneral.SetGeneralWaitForMagic(info.TIME);
            warCtrl.SetCameraMoveTo(new Vector3(
                                        warCtrl.rightGeneral.transform.localPosition.x,
                                        -30,
                                        0));
        }
        else
        {
            enemySide = WarSceneController.WhichSide.Right;
            warCtrl.leftGeneral.SetGeneralWaitForMagic(info.TIME);
            warCtrl.SetCameraMoveTo(new Vector3(
                                        warCtrl.leftGeneral.transform.localPosition.x,
                                        -30,
                                        0));
        }

        if (no == 18 || no == 49)
        {
            magicCount = 3;
        }
        else
        {
            magicCount = 1;
        }

        grayCtrl.SetGray(true);
        warCtrl.WaitforMagicMoveToGeneral();
    }
Exemple #6
0
    IEnumerator ShowFireUp()
    {
        for (int i = 0; i < 10; i++)
        {
            listFireUp[i].SetActive(true);
            yield return(new WaitForSeconds(0.1f));
        }

        Destroy(particalGO);

        warCtrl.SetCameraMoveTo(new Vector3(enemyCenterPos.x, -90, 0));
    }
Exemple #7
0
    void WaitForCameraMoveToGeneral()
    {
        warCtrl.SetCameraMoveTo(new Vector3(enemyCenterPoint.x, -180, 0));

        Invoke("WaitForShowWord", 0.2f);
    }
Exemple #8
0
    void WaitForCameraMoveToGeneral()
    {
        warCtrl.SetCameraMoveTo(new Vector3(enemyCenterPoint.x, -180, 0));

        StartCoroutine(ShowCars());
    }
    void WaitForCameraMoveToGeneral()
    {
        warCtrl.SetCameraMoveTo(new Vector3(armyCenterPoint.x, -30, 0));

        Invoke("WaitForShowLightningStroke", 0.3f);
    }
    void WaitForCameraMoveToGeneral()
    {
        warCtrl.SetCameraMoveTo(new Vector3(centerPoint.x, -90, 0));

        Invoke("WaitForShowDragon", 0.3f);
    }