コード例 #1
0
 /// <summary>
 /// Create a new instance of SceneManager.
 /// </summary>
 /// <param name="game">The renderable game.</param>
 /// <param name="shotManager">The shot manager.</param>
 public SceneManager(RenderableGame game, ShotManager shotManager)
     : base(game)
 {
     this.ShotManager = shotManager;
     this.Scenes      = new Dictionary <string, Scene>();
     this.ShotLoaded  = new List <Shot>();
 }
コード例 #2
0
        /// <summary>
        /// Load a shot in a async process
        /// </summary>
        /// <param name="shot"></param>
        private void LoadAsync(Shot shot)
        {
            lock (this._syncRoot)
            {
                RenderableGame game = (RenderableGame)this.Game;
                shot.LoadContent(game.Content);
                this.ShotLoaded.Add(shot);
                OnLoadProgress(this.ShotLoaded.Count);

                if (this.ShotLoaded.Count == this.Current.ShotTypes.Count)
                {
                    OnSceneLoaded();
                }
            }
        }
コード例 #3
0
 /// <summary>
 /// Create a new instance of ShotManager
 /// </summary>
 /// <param name="game">RenderableGame</param>
 public ShotManager(RenderableGame game)
     : base(game)
 {
     this.Shots = new List <Shot>();
 }