public static void Initialize(CCGameView gameView)
        {
            GameView = gameView;

            var contentSearchPaths = new List <string>()
            {
                "Fonts", "Sounds"
            };

#if __IOS__
            contentSearchPaths.Add("Sounds/iOS/");
#else // android
            contentSearchPaths.Add("Sounds/Android/");
#endif

            contentSearchPaths.Add("Images");
            GameView.ContentManager.SearchPaths = contentSearchPaths;


            // We use a lower-resolution display to get a pixellated appearance
            int width  = 384;
            int height = 208;
            GameView.DesignResolution = new CCSizeI(width, height);
            GameView.ResolutionPolicy = CCViewResolutionPolicy.ShowAll;

#if DEBUG
            GameView.Stats.Enabled = true;
#endif

            InitializeAudio();

            var scene = new StartScene(GameView);
            GameView.RunWithScene(scene);
        }
Example #2
0
    private void OnEnable()
    {
        Debug.Log("OnEnableDiana");
        if (startScene == StartScene.Premium)
        {
            startScene = StartScene.Standart;
        }

        switch (startScene)
        {
        case StartScene.Greeting:
            SetGreetingScene();
            break;

        case StartScene.Standart:
            SetStandartScene();
            break;

        case StartScene.Premium:
            throw new NotSupportedException();

        case StartScene.Vip:
            SetVipScene();
            break;

        case StartScene.Interactive:
            SetInteractiveScene();
            break;

        case StartScene.Ending:
            SetEndScene();
            break;
        }
    }
Example #3
0
        private void LoadScenes()
        {
            //Laddar scenes och hämtar all content som behövs
            //Spelet är uppbyggt med "scener" som är olika spellägen
            //Dessa är bland annat startmenyn och själva spelläget
            smallFont              = Content.Load <SpriteFont>("menuSmall");
            largeFont              = Content.Load <SpriteFont>("menuLarge");
            Globals.font           = smallFont;
            startBackgroundTexture = Content.Load <Texture2D>("images/MainMenuFinal");

            //Skapar en startscen där smallfont är fonten som används när man inte har
            //musen över en länk och largefont är för vald font. StartBack.. är scenens
            //bakgrund.
            startScene = new StartScene(this, smallFont, largeFont,
                                        startBackgroundTexture);

            //Samma som ovan
            consoleScene = new ConsoleScene(this, smallFont, largeFont, startBackgroundTexture);

            playingScene = new PlayingScene(this, crossHair, HUD);

            //Components är typ spelets komponenter :O används för att den ska rita ut allt o shit!
            Components.Add(consoleScene);
            Components.Add(startScene);
            Components.Add(playingScene);

            //Visar startscenen
            startScene.Show();
            activeScene = startScene;
        }
Example #4
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            // TODO: use this.Content to load your game content here
            Shared.Stage = new Vector2(graphics.PreferredBackBufferWidth, graphics.PreferredBackBufferHeight);

            // instantiate all scenes
            startScene = new StartScene(this, spriteBatch);
            this.Components.Add(startScene);

            actionScene = new ActionScene(this, spriteBatch);
            this.Components.Add(actionScene);

            helpScene = new HelpScene(this, spriteBatch);
            this.Components.Add(helpScene);

            highScoreScene = new HighScoreScene(this, spriteBatch);
            this.Components.Add(highScoreScene);

            aboutScene = new AboutScene(this, spriteBatch);
            this.Components.Add(aboutScene);

            gameOverScene = new GameOverScene(this, spriteBatch);
            this.Components.Add(gameOverScene);

            // show start scene
            startScene.Show();
        }
Example #5
0
        public override void ApplicationDidFinishLaunching(CCApplication application, CCWindow mainWindow)
        {
            application.ContentRootDirectory = "Content";
            var windowSize = mainWindow.WindowSizeInPixels;

            //new:
            mainWindow.DisplayStats = true;
            mainWindow.StatsScale   = 1;

            // This will set the world bounds to be (0,0, w, h)
            // CCSceneResolutionPolicy.ShowAll will ensure that the aspect ratio is preserved
            CCScene.SetDefaultDesignResolution(600, 400, CCSceneResolutionPolicy.NoBorder); //ShowAll, NoBorder

            // Determine whether to use the high or low def versions of our images
            // Make sure the default texel to content size ratio is set correctly
            // Of course you're free to have a finer set of image resolutions e.g (ld, hd, super-hd)
            if (600 < windowSize.Width)
            {
                application.ContentSearchPaths.Add("hd");
                CCSprite.DefaultTexelToContentSizeRatio = 2.0f;
            }
            else
            {
                application.ContentSearchPaths.Add("ld");
                CCSprite.DefaultTexelToContentSizeRatio = 1.0f;
            }

            var startScene = new StartScene(mainWindow);

            mainWindow.RunWithScene(startScene);
        }
Example #6
0
 public void Initialize()
 {
     starScene   = new StartScene();
     loginScene  = new LoginScene();
     mainScene   = new MainScene();
     battleScene = new BattleScene();
 }
Example #7
0
        public override void AddScenes()
        {
            SceneManager.AddScene(dungeonScene = new DungeonScene());
            SceneManager.AddScene(playScene    = new StartScene());

            dungeonScene.Name = "Dugneon";
            playScene.Name    = "Play";
        }
Example #8
0
    private void OnDestroy()
    {
        PlayerPrefs.SetString("SaveLastTime", System.DateTime.Now.ToString());

        StartScene ST_S = FindObjectOfType <StartScene>();

        PlayerPrefs.SetFloat("SteminaNum", ST_S.SteminaNum);
    }
Example #9
0
    void Start()
    {
        Screen.SetResolution(900, 1600, true);



        instance = this;
    }
Example #10
0
        public static void RunMain()
        {
            StartScene scene = new StartScene();
            StartLayer layer = new StartLayer();

            scene.addChild(layer);
            CCDirector.sharedDirector().runWithScene(scene);
        }
Example #11
0
 private void Awake()
 {
     if (instance != null && instance != this)
     {
         Destroy(this.gameObject);
         return;
     }
     instance = this;
 }
Example #12
0
    // Update is called once per frame
    void Update()
    {
        bool fire1 = Input.GetButtonDown("Fire1");
        bool fire2 = Input.GetButtonDown("Fire2");
        bool fire3 = Input.GetButtonDown("Fire3");
        bool fire4 = Input.GetButtonDown("Fire4");

        if (fire2)
        {
            playerUI[1].SetActive(true);
            players[1] = true;
        }
        if (fire3)
        {
            playerUI[2].SetActive(true);
            players[2] = true;
        }
        if (fire4)
        {
            playerUI[3].SetActive(true);
            players[3] = true;
        }

        int num = 0;

        for (int i = 0; i < playerUI.Length; i++)
        {
            if (playerUI[i].active)
            {
                if (players[i] && playerUI[i].GetComponent <PowerSelection>().ready)
                {
                    num++;
                }
                else
                {
                    return;
                }
            }
        }
        if (num > 1)
        {
            StartScene sc = GameObject.Find("StartController").GetComponent <StartScene>();
            if (sc != null)
            {
                for (int i = 0; i < players.Length; i++)
                {
                    if (!players[i])
                    {
                        Destroy(p[i]);
                    }
                }
                sc.LoadScene("MultiLevelSelect");
            }
        }
    }
Example #13
0
        static void Main(string[] args)
        {
            RequestClient client = new RequestClient(IPAddress.Loopback, 5723);

            Scene scene = new StartScene();

            while (scene != null)
            {
                scene = scene.Handle(client);
            }
        }
Example #14
0
    private void Awake()
    {
        if (instance != null)
        {
            Destroy(gameObject);
            return;
        }

        instance = this;
        DontDestroyOnLoad(gameObject);
    }
Example #15
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here
            base.Initialize();

            Shared.Stage = new Vector2(mGraphics.PreferredBackBufferWidth,
                                       mGraphics.PreferredBackBufferHeight);

            GameMenuManager = new MenuManager();
            mStartScene     = new StartScene(this);
            mCurrentScene   = mStartScene;
        }
Example #16
0
 /// <summary>
 /// 显示游戏结束UI
 /// </summary>
 public void ShowGameOver()
 {
     img_GameOver.gameObject.SetActive(true);
     if (GameManager.curGameModel != GameModel.Game)
     {
         img_GameOver.GetComponent <Animator>().enabled = true;
         img_GameOver.GetComponent <Animator>().SetTrigger("isGameOver");
     }
     else
     {
         img_GameOver.GetComponent <Animator>().enabled = false;
         img_GameOver.transform.localPosition           = new Vector3(snakeMoveScript.transform.localPosition.x, snakeMoveScript.transform.localPosition.y, 0);
     }
     //写入数据 数据持久化
     StartScene.WriteDataToRegister(SnakeHead.curSnakeLength, int.Parse(txt_Score.text), int.Parse(txt_Kiss.text));
 }
        public void GoombaIsCoinboxTest()
        {
            var game = new GameObject("Mario");

            ResourceManager.Instance.LoadSpriteSheetFromFile("sm-mario-sprites", @"resources\sm-mario-sprites.png", 10);
            ResourceManager.Instance.LoadFontFromFile("arial", @"resources\arial.ttf");

            // gets current level file
            var levelFilePath = Directory.GetCurrentDirectory() + @"\leveldata.xml";
            var levelText     = File.ReadAllText(levelFilePath);
            var levelXml      = XDocument.Parse(levelText);
            var rows          = levelXml.XPathSelectElements("//row");

            // replaces all goombas (50) with coinboxes (3)
            foreach (var row in rows.Where(row => row.Value.Contains("50")))
            {
                row.Value = row.Value.Replace("50", "3");
            }

            // saves new temporary level file
            var tempLevelFilePath = Path.GetTempFileName();

            File.WriteAllText(tempLevelFilePath, levelXml.ToString());

            var s = new MainScene(game, tempLevelFilePath)
            {
                Name = "play"
            };

            game.SceneManager.AddScene(s);

            var s2 = new StartScene(game)
            {
                Name = "start"
            };

            game.SceneManager.AddScene(s2);

            var s3 = new GameOverScene(game)
            {
                Name = "gameover"
            };

            game.SceneManager.AddScene(s3);

            game.SceneManager.StartScene("play");
        }
Example #18
0
        // public static LoadingScene loadingScene;
        // private static SceneBase _nextScene;
        /// <summary>
        /// Fade 1渐  2Blinds 百页窗 5Ninja  6Cinema电影院  7Pixelate像素闪烁  8Tetris掉片片  9Tiles翻片片
        /// </summary>
        //private static string[] transitionName = new string[] { "Plain", "Fade", "Blinds", "Newspaper", "Cartoon", "Ninja", "Cinema", "Pixelate", "Tetris", "Tiles" };
        //private static string[] transitionPrefab = new string[] {"Transitions/SMLoadingTransition", "Transitions/SMFadeTransition",
        //"Transitions/SMBlindsTransition", "Transitions/SMNewspaperTransition", "Transitions/SMCartoonTransition",
        //"Transitions/SMNinjaTransition", "Transitions/SMCinemaTransition", "Transitions/SMPixelateTransition",
        //"Transitions/SMTetrisTransition", "Transitions/SMTilesTransition"};

        void init()
        {
            //smsceneManager = new SMSceneManager(SMSceneConfigurationLoader.LoadActiveConfiguration("SceneConfig"));
            //smsceneManager.LevelProgress = new SMLevelProgress(smsceneManager.ConfigurationName);

            //StartScene ss = StartScene.Create(null);
            //_sceneCreators = new Dictionary<SceneType, Func<object, SceneBase>>();
            //_sceneCreators[SceneType.Login] = LoginScene.Create;
            ////_sceneCreators[SceneType.Loading] = LoadingScene.Create;
            //_sceneCreators[SceneType.City] = CityScene.Create;
            //_sceneCreators[SceneType.Fight] = FightScene.Create;
            //_sceneCreators[SceneType.House] = HouseScene.Create;
            //_sceneCreators[SceneType.Fram] = FramScene.Create;
            //_sceneCreators[SceneType.Map] = MapScene.Create;
            //_sceneCreators[SceneType.TeamFight] = TeamFightScene.Create;
            //_sceneCreators[SceneType.War] = WarScene.Create;

            // loadingScene= LoadingScene.Create(null);
            currScene = StartScene.Create(null);
            currScene.CreateView();
        }
Example #19
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            _resources = new Resources(this);

            // Add startScene
            startScene = new StartScene(this, spriteBatch);
            Components.Add(startScene);
            startScene.Show(true);

            // Add playScene
            playScene = new GameScene(this, spriteBatch);
            Components.Add(playScene);
            playScene.Show(false);

            // Add creditsScene
            creditsScene = new CreditsScene(this, spriteBatch);
            Components.Add(creditsScene);
            creditsScene.Show(false);

            // Add helpScene
            helpScene = new HelpScene(this, spriteBatch);
            Components.Add(helpScene);
            helpScene.Show(false);

            // Add highScoreScene
            highScoreScene = new HighScoreScene(this, spriteBatch);
            Components.Add(highScoreScene);
            highScoreScene.Show(false);

            // Create enterSound
            enterSoundIns = this.Content.Load <SoundEffect>("Sounds/enterSound").CreateInstance();

            // Create and play music
            menuMusic = this.Content.Load <Song>("Sounds/pauseMenu");
            MediaPlayer.Play(menuMusic);
        }
Example #20
0
        public void Run()
        {
            IInput input = new Keyboard();
            IScene scene = new StartScene();

            try {
                while (true)
                {
                    input.Update();
                    scene = scene.Update(input);
                    if (scene.IsApplicationFinish())
                    {
                        break;
                    }

                    Thread.Sleep(33);
                }
            }
            catch (Exception e) {
                Console.WriteLine("エラーが発生しました。: " + e);
                Console.ReadKey();
            }
        }
Example #21
0
    public override void execute()
    {
        StartScene gameScene = (mReceiver) as StartScene;

        if (gameScene.atProcedure(PROCEDURE_TYPE.PT_START_SELECT_ROLE))
        {
            CharacterOther curRole = mRoleSystem.getSelectedRole();
            // 当前角色有SELECT_ROLE状态组,如果没有,则说明是第一次进入选人流程
            if (curRole != null && curRole.hasStateGroup(STATE_GROUP.SG_SELECT))
            {
                // 当前角色显示完毕时才能切换角色,也不能选择相同的角色
                if (!curRole.hasState(PLAYER_STATE.PS_SELECTED_ROLE) || mRoleSystem.getSelectedIndex() == mIndex)
                {
                    return;
                }
                // 取消当前角色的选中
                CommandCharacterAddState cmdUnSelect = newCmd(out cmdUnSelect);
                cmdUnSelect.mState = PLAYER_STATE.PS_UN_SELECT_ROLE;
                pushCommand(cmdUnSelect, curRole);
            }
            // 启动选择的角色
            mRoleSystem.setSelectedIndex(mIndex);
            CharacterOther character = mRoleSystem.getSelectedRole();
            if (character != null)
            {
                CommandCharacterAddState cmdSelect = newCmd(out cmdSelect);
                cmdSelect.mState = PLAYER_STATE.PS_ON_SELECT_ROLE;
                pushCommand(cmdSelect, character);
                // 通知布局
                mScriptSelectRole.selectRole(mIndex);
                if (mPlayAudio)
                {
                    GameTools.PLAY_AUDIO_UI(mScriptGlobalAudio.getAudioWindow(), SOUND_DEFINE.SD_SELECTION_CHANGE);
                }
            }
        }
    }
Example #22
0
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            _spriteBatch = new SpriteBatch(_graphics.GraphicsDevice);
            Services.AddService(typeof(SpriteBatch), _spriteBatch);

            _audio = new AudioLibrary();
            _audio.LoadContent(this.Content);
            Services.AddService(typeof(AudioLibrary), _audio);

            helpBackgroundTexture = Content.Load<Texture2D>("helpbackground");
            helpForegroundTexture = Content.Load<Texture2D>("helpforeground");
            _helpScene = new HelpScene(this, helpBackgroundTexture, helpForegroundTexture);
            Components.Add(_helpScene);

            // Create the Start scene
            smallFont = Content.Load<SpriteFont>("menuSmall");
            largeFont = Content.Load<SpriteFont>("menuLarge");
            startBackgroundTexture = Content.Load<Texture2D>("startBackground");
            startElementsTexture = Content.Load<Texture2D>("startSceneElements");
            _startScene = new StartScene(this, smallFont, largeFont, startBackgroundTexture, startElementsTexture);
            Components.Add(_startScene);
            _creditScene = new CreditScene(this, smallFont, largeFont, startBackgroundTexture, startElementsTexture);
            Components.Add(_creditScene);

            actionElementsTexture = Content.Load<Texture2D>("rockrainenhanced");
            actionBackgroundTexture = Content.Load<Texture2D>("spacebackground");
            scoreFont = Content.Load<SpriteFont>("score");
            scoreFont = Content.Load<SpriteFont>("score");
            //_actionScene = new ActionScene(this, actionElementsTexture, actionBackgroundTexture, _scoreFont);
            //Components.Add(_actionScene);

            _joinScene = new JoinScene(this, largeFont, menuControllers);
            Components.Add(_joinScene);
            _startScene.Show();
            _activeScene = _startScene;
        }
Example #23
0
        static void Main(string[] args) //主方法
        {
            //初始化某些基本设置
            Config.init();

            //控制台基本设置
            Console.Title = "贪吃蛇";          //设置控制台标题
            Console.SetWindowSize(100, 50); //设置控制台窗口大小
            Console.SetBufferSize(101, 51); //设置控制台缓冲区大小
            Console.CursorVisible = false;  //隐藏光标

            //进入游戏主循环
            while (true)
            {
                //开始场景
                StartScene startScene = new StartScene();
                startScene.init();
                int startSceneReturn = startScene.run(); //获取开始场景的运行结果(即按下的是哪个键)
                Console.Clear();
                //判定接下来走哪个场景
                //开始新游戏
                if (startSceneReturn == '1')
                {
                    //速度选择场景
                    SpeedChooseScene speedChooseScene = new SpeedChooseScene();
                    speedChooseScene.init();
                    int difficulty = speedChooseScene.run(); //获取所选择的难度
                    Console.Clear();
                    //游戏主场景
                    GameScene gameScene = new GameScene();
                    gameScene.init(difficulty - '0');
                    int score = gameScene.run(); //获取最终得分
                    Console.Clear();
                    //游戏结束场景
                    GameEndScene gameEndScene = new GameEndScene();
                    gameEndScene.init(score);
                    gameEndScene.run();
                    Console.Clear();
                }
                //最高分
                else if (startSceneReturn == '2')
                {
                    //最高分场景
                    HighestScoreScene highestScoreScene = new HighestScoreScene();
                    highestScoreScene.init();
                    highestScoreScene.run();
                    Console.Clear();
                }
                //设置
                else if (startSceneReturn == '3')
                {
                    //设置界面
                    SettingScene settingScene = new SettingScene();
                    settingScene.init();
                    int settingChoose = settingScene.run(); //获取选择了哪个选项
                    Console.Clear();
                    //颜色选择界面
                    ColorChooseScene colorChooseScene = new ColorChooseScene();
                    colorChooseScene.init(settingChoose);
                    colorChooseScene.run();
                    Console.Clear();
                }
                //退出游戏
                else if (startSceneReturn == '4')
                {
                    break;
                }
            }

            //保存相关设置
            Config.uninit();
        }
Example #24
0
 public DungeonGame()
 {
     _startScene = new StartScene();
     _gameScene  = new GameScene();
 }
Example #25
0
 void Start()
 {
     scene = this;
 }
Example #26
0
 public void DoVictory()
 {
     Cursor.lockState = CursorLockMode.None;
     mainUI.SetVectory(true);
     StartScene.CompleteLevel(lv);
 }
Example #27
0
    public void Start()
    {
        #region 初始化数据
        txt_Length.text = "1";
        txt_Score.text  = "0";
        txt_Kiss.text   = "0";
        img_GameOver.gameObject.SetActive(false);
        img_AudioVolume.gameObject.SetActive(false);
        img_Win.gameObject.SetActive(false);

        //隐藏杀敌数UI
        if (GameManager.curGameModel != GameModel.Game)
        {
            title_KissContainer.gameObject.SetActive(false);
        }
        //隐藏边框
        if (GameManager.curGameModel == GameModel.Normal)
        {
            GameObject[] borders = GameObject.FindGameObjectsWithTag("Wall");
            foreach (var item in borders)
            {
                item.GetComponent <Image>().enabled = false;
            }
        }

        //根据游戏的模式  更新UI模式
        SetUIBySelectModel();

        if (GameManager.curGameModel != GameModel.Game)
        {
            GameObject.Find("Canvas_Enemy").SetActive(false);
        }
        #endregion

        #region 右上角功能按钮
        btn_Enum.onClick.AddListener(() =>
        {
            //切换菜单界面
            SceneManager.LoadScene("StartScene");
        });
        btn_Parse.onClick.AddListener(() =>
        {
            //暂停
            if (Time.timeScale == 1)
            {
                Time.timeScale = 0;
                btn_Parse.GetComponent <Button>().image.sprite = spr_Play;
                btn_Parse.GetComponent <Button>().image.color  = Color.red;
            }
            //播放
            else if (Time.timeScale == 0)
            {
                Time.timeScale = 1;
                btn_Parse.GetComponent <Button>().image.sprite = spr_Parse;
                btn_Parse.GetComponent <Button>().image.color  = Color.black;
            }
        });

        //切换旋转方式
        btn_ChangeTurn.onClick.AddListener(() =>
        {
            snakeMoveScript.ChangeTurnType();
        });
        #endregion

        #region 重启游戏逻辑
        //重启游戏
        btn_AgainGame.onClick.AddListener(() =>
        {
            //TODO
            txt_Length.text = "1";
            txt_Score.text  = "0";
            txt_Kiss.text   = "0";
            img_GameOver.GetComponent <Animator>().SetTrigger("isGameOver");
            img_GameOver.GetComponent <Animator>().SetTrigger("isRestartGame");
            StartCoroutine("WaitHide");
            snakeMoveScript.ReStartGame();
            GameObject.Find("AudioManager").GetComponent <AudioManager>().PlayAudio(0);
            if (GameManager.curGameModel == GameModel.Game)
            {
                GameObject.FindGameObjectWithTag("EnemyHead").GetComponent <EnemyAI>().ReStartGame();
            }
        });
        //返回主菜单
        btn_ReturnStartScene.onClick.AddListener(() =>
        {
            //切换菜单界面
            SceneManager.LoadScene("StartScene");
            img_GameOver.gameObject.SetActive(false);
            Time.timeScale = 1;
        });
        #endregion

        #region  一关卡
        btn_Next.onClick.AddListener(() =>
        {
            //TODO
            txt_Length.text = "1";
            txt_Score.text  = "0";
            img_Win.gameObject.SetActive(false);
            snakeMoveScript.ReStartGame();
            GameObject.Find("AudioManager").GetComponent <AudioManager>().PlayAudio(0);
            if (GameManager.curGameModel == GameModel.Game)
            {
                //GameObject.FindGameObjectWithTag("EnemyHead").GetComponent<EnemyAI>().PlayerWinNextLevel();
                GameObject.FindGameObjectWithTag("EnemyHead").GetComponent <EnemyAI>().ReStartGame();
            }
        });
        btn_BackStartScene.onClick.AddListener(() =>
        {
            //写入数据 数据持久化
            StartScene.WriteDataToRegister(SnakeHead.curSnakeLength, int.Parse(txt_Score.text), int.Parse(txt_Kiss.text));
            //切换菜单界面
            SceneManager.LoadScene("StartScene");
            img_Win.gameObject.SetActive(false);
            Time.timeScale = 1;
        });
        #endregion

        #region 小地图交互
        btn_MiniMapAdd.onClick.AddListener(() =>
        {
            GameObject.FindGameObjectWithTag("MainCamera").GetComponent <ExampleInteractions>().MiniMapInteraction(true);
        });
        btn_MiniMapSub.onClick.AddListener(() =>
        {
            GameObject.FindGameObjectWithTag("MainCamera").GetComponent <ExampleInteractions>().MiniMapInteraction(false);
        });
        #endregion

        #region 音量调节事件
        //打开/关闭 画布
        btn_Audio.onClick.AddListener(() =>
        {
            if (img_AudioVolume.IsActive())
            {
                img_AudioVolume.gameObject.SetActive(false);
            }
            else
            {
                img_AudioVolume.gameObject.SetActive(true);
            }
        });
        //关闭画布
        btn_ExitAudioVolume.onClick.AddListener(() =>
        {
            if (img_AudioVolume.IsActive())
            {
                img_AudioVolume.gameObject.SetActive(false);
            }
        });

        #endregion
    }