コード例 #1
0
ファイル: MenuLogic.cs プロジェクト: cribin/GameLab2017
        public override void Initialize()
        {
            //Init Menu map from tiled
            TiledMap tiledMenu = new TiledMap(MainConfig.CONTENT_MAP_DIRECTORY + "Menu.xml", director.Content, MainConfig.PIPELINE_GRAPHICS_DIRECTORY, scene);

            BaseScreenSize = tiledMenu.MapSize;

            //Init temporary players, which need to join to registered in the scene
            tempPlayer        = new Player[4];
            selectedPlayers   = new bool[4];
            numOfReadyPlayers = 0;

            for (var i = 0; i < 4; i++)
            {
                tempPlayer[i] = new Player((PlayerIndex)i, new MenuInputMapper(true));
            }

            //************************* INIT SOUND MANAGER ************************//
            MatchSoundManager matchSoundManager = new MatchSoundManager(director.Content);

            scene.RegisterMatchSoundManager(matchSoundManager);
#if DEBUG
            matchSoundManager.IsMuted = true;
#endif
            matchSoundManager.PlaySong(SongEnumeration.Title);
        }
コード例 #2
0
 private void Awake()
 {
     resultsScreen = false;
     if (Instance == null)
     {
         Instance = this;
        
     }
    
 }
コード例 #3
0
ファイル: Scene.cs プロジェクト: cribin/GameLab2017
 public void RegisterMatchSoundManager(MatchSoundManager matchSoundManager)
 {
     this.MatchSoundManager = matchSoundManager;
 }