示例#1
0
        public void OpeningStart()
        {
            uiCanvas.SetActive(true);
            uiCanvas = null;

            MessageSystem.Publish(BattleStageStartEvent.Create(Stage));
            Stage++;
        }
示例#2
0
        public void StartBattleStage()
        {
            string theme = "Desert";

            if (Stage == 1)
            {
                theme = "Ice";
                TileManager.Instance.CreateTileMap((TileTheme)1, 12, 3);
            }
            else if (Stage == 2)
            {
                TileManager.Instance.CreateTileMap((TileTheme)2, 9, 5);
            }
            else
            {
                int map = UnityEngine.Random.Range(0, 3);
                int x   = UnityEngine.Random.Range(8, 13);
                int z   = UnityEngine.Random.Range(3, 6);
                TileManager.Instance.CreateTileMap((TileTheme)map, x, z);

                switch (map)
                {
                case 0:
                    theme = "Forest";
                    break;

                case 1:
                    theme = "Ice";
                    break;

                default:
                    break;
                }
            }

            SoundManager.Instance.PlayBGM(theme, 0.2f);
            Camera camera = Camera.main;

            camera.transform.position = new Vector3(4, 5.2f, -2.1f);
            ParticleSystem dust = GameManager.Instance.EffectSystem.CreateEffect(theme + "Dust", camera.transform.position + new Vector3(0, -1.5f, 2), new Vector3(0.5f, 0.5f, 0.5f), Quaternion.Euler(new Vector3(-90, 0, 0)));

            dust.transform.SetParent(camera.transform);

            MessageSystem.Publish(BattleStageStartEvent.Create(Stage));
            Stage++;
        }