コード例 #1
0
ファイル: Program.cs プロジェクト: ARLM-Attic/xna-dash
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 private static void Main(string[] args)
 {
     using (XNADash game = new XNADash())
     {
         game.Run();
     }
 }
コード例 #2
0
ファイル: SceneGraph.cs プロジェクト: ARLM-Attic/xna-dash
 /// <summary>
 /// Default constructor
 /// </summary>
 /// <param name="gameReference">Reference to the main game</param>
 /// <param name="sb">The sprite batch</param>
 public SceneGraph(XNADash gameReference, SpriteBatch sb)
 {
     currentSceneList = new List <Scene2DNode>();
     game             = gameReference;
     batch            = sb;
     outputTextList   = new List <string>();
 }
コード例 #3
0
ファイル: Sprite.cs プロジェクト: ARLM-Attic/xna-dash
 /// <summary>
 /// Initializes the sprite
 /// </summary>
 /// <param name="game">Reference to the main game</param>
 /// <param name="Tex">The sprite texture</param>
 /// <param name="position">The position in world coodinates</param>
 public Sprite(XNADash game, Texture2D Tex, Vector2 position)
 {
     gameInstance = game;
     texture      = Tex;
     Position     = position;
     color        = Color.White;
     CalculateBounds();
 }
コード例 #4
0
        /// <summary>
        /// Initializes the sprite
        /// </summary>
        /// <param name="game">Reference to the game</param>
        /// <param name="enemy">The type enemy</param>
        /// <param name="position">The starting position</param>
        public EnemySprite(XNADash game, EnemyEnum enemy, Vector2 position)
        {
            enemyType = enemy;
            if (enemyType == EnemyEnum.Butterfly)
            {
                texture = game.Content.Load <Texture2D>("butterfly");
            }
            else if (enemyType == EnemyEnum.Firefly)
            {
                texture = game.Content.Load <Texture2D>("firefly");
            }

            Speed = 500f;

            MoveUp();
            gameInstance = game;
            Position     = position;
            Destination  = position;
        }
コード例 #5
0
ファイル: MovingSprite.cs プロジェクト: ARLM-Attic/xna-dash
 /// <summary>
 /// Constructor to create the sprite
 /// </summary>
 /// <param name="game">Reference to the main game</param>
 /// <param name="Tex">The texture to draw</param>
 /// <param name="position">The initial position of the sprite in game coordinates</param>
 public MovingSprite(XNADash game, Texture2D Tex, Vector2 position) : base(game, Tex, position)
 {
     gameInstance = game;
     Destination  = position;
     MoveStandStill();
 }
コード例 #6
0
 /// <summary>
 /// Default constructor
 /// </summary>
 /// <param name="game">Instance of the main game class</param>
 public TileFactory(XNADash game)
 {
     gameInstance = game;
 }
コード例 #7
0
ファイル: Level.cs プロジェクト: ARLM-Attic/xna-dash
 /// <summary>
 /// Constructor of the level
 /// </summary>
 /// <param name="gameInstance">Reference to the game</param>
 public Level(XNADash gameInstance)
 {
     game         = gameInstance;
     factory      = new TileFactory(game);
     npcContainer = new NPCContainer();
 }