コード例 #1
0
ファイル: Tower.cs プロジェクト: RamiAhmed/Tower-Shake
        public Tower(LogicController parentClass)
        {
            logicClass = parentClass;

            Console.WriteLine("Tower class instantiated!");
            init();
        }
コード例 #2
0
ファイル: Player.cs プロジェクト: RamiAhmed/Tower-Shake
        public Player(LogicController parentClass)
        {
            logicClass = parentClass;

            init();

            Console.WriteLine("Player instantiated");
        }
コード例 #3
0
ファイル: Game.cs プロジェクト: RamiAhmed/Tower-Shake
        /// <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()
        {
            presentationController = new Presentation.PresentationController(this);
            logicController = new Logic.LogicController(this);

            Components.Add(presentationController);
            Components.Add(logicController);

            //this.IsMouseVisible = true;
            this.IsFixedTimeStep = true;
            this.TargetElapsedTime = TimeSpan.FromSeconds(1.0f / Logic.Constants.FPS);
            graphicsManager.IsFullScreen = false;
            graphicsManager.PreferredBackBufferWidth = Logic.Constants.StageWidth;
            graphicsManager.PreferredBackBufferHeight = Logic.Constants.StageHeight;
            graphicsManager.ApplyChanges();
            Window.Title = Logic.Constants.WindowTitle;

            Logic.GameStateHandler.CurrentGameState = Logic.GameState.MENU;

            Console.WriteLine("Initializing");
            // TODO: Add your initialization logic here
            base.Initialize();
        }
コード例 #4
0
ファイル: Critter.cs プロジェクト: RamiAhmed/Tower-Shake
 public Critter(LogicController parentClass)
 {
     logicClass = parentClass;
     //Console.WriteLine("Critter instantiated!");
 }