/// <summary> /// The main entry point for the application. /// </summary> private static void Main(string[] args) { using (XNADash game = new XNADash()) { game.Run(); } }
/// <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>(); }
/// <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(); }
/// <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; }
/// <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(); }
/// <summary> /// Default constructor /// </summary> /// <param name="game">Instance of the main game class</param> public TileFactory(XNADash game) { gameInstance = game; }
/// <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(); }