public BattleScreen(MiGame game, MiTileEngine tileEngine) : base(game) { if (Instance == null) { flash = new MiAnimatingComponent(Game, 0, 0, 1280, 800, 0, 0, 0, 0); this.tileEngine = tileEngine; inputResponses[Controller.START] = Escaped; inputResponses[Controller.LEFT] = Lefted; inputResponses[Controller.RIGHT] = Righted; inputResponses[Controller.UP] = Upped; inputResponses[Controller.DOWN] = Downed; inputResponses[Controller.A] = Pressed; positions = new Dictionary<Character, Point>(); cursor = new MiAnimatingComponent(game, 0, 0, 0, 0); cursor.Color = Color.Yellow; selectedValidMoves = new Dictionary<Point, int>(); selectedAOE = new Dictionary<Point, int>(); random = new Random(); } else { throw new Exception("Battle Screen Already Initialized"); } }
public MiScreen(MiGame game) : base(game) { Enabled = false; Visible = false; inputResponses = new Dictionary <MiControl, MiScript>(); }
public MiTileEngine(MiGame game, int tileWidth, int tileHeight) : base(game) { this.tileWidth = tileWidth; this.tileHeight = tileHeight; tiles = new Dictionary <char, MiTileType>(); }
public InputHandler(MiGame game) : base(game) { oldState = Controller.GetState(); holdTimer = new Dictionary<MiControl, int>(); foreach (MiControl control in Controller.controls) { holdTimer[control] = 0; } }
public MessageScreen(MiGame game) : base(game) { if (Instance == null) { background = new MiAnimatingComponent(game, 0, HEIGHT, MiResolution.VirtualWidth, MiResolution.VirtualHeight - HEIGHT, 0, 0, 0, 0); inputResponses[Controller.A] = ExitSequence; entryExitMutex = false; } else { throw new Exception("Dialog Screen Already Initialized"); } }
public StartScreen(MiGame game) : base(game) { if (Instance == null) { background = new MiAnimatingComponent(game,0, 0, 1280, 800); cursor = new MiAnimatingComponent(game, 683, 328, 33, 35); // // New Game Button // newGameButton = new MiButton(); newGameButton.Pressed += delegate { WorldScreen.Instance.Activate(); return null; }; newGameButtonBase = new MiAnimatingComponent(game, 733, 278, 502, 107); // // Quit Game Button // quitGameButton = new MiButton(); quitGameButton.Pressed += delegate { Game.Exit(); return null; }; quitGameButtonBase = new MiAnimatingComponent(game, 750, 418, 488, 127, 0, 0, 0, 0); // // Default Active Button // ActiveButton = newGameButton; // // Reponses to Input // inputResponses[Controller.UP] = Upped; inputResponses[Controller.DOWN] = Downed; inputResponses[Controller.A] = Pressed; } else { throw new Exception("Start Screen Already Initialized"); } }
public MiAnimatingComponent(MiGame game, int init_x, int init_y, int width, int height, float init_rotate, float origin_x, float origin_y, byte alpha) : base(game) { spriteQueue = new Dictionary <Enum, Queue <KeyValuePair <Texture2D, int> > >(); spriteQueueTimer = 0; SpriteState = SpriteStates.DEFAULT; moveTimer = 0; boundingRectangle = new Rectangle(init_x, init_y, width, height); rotation = init_rotate; origin = new Vector2(origin_x, origin_y); XPositionOverTime = new Curve(); XPositionOverTime.Keys.Add(new CurveKey(0, init_x)); YPositionOverTime = new Curve(); YPositionOverTime.Keys.Add(new CurveKey(0, init_y)); WidthOverTime = new Curve(); WidthOverTime.Keys.Add(new CurveKey(0, width)); HeightOverTime = new Curve(); HeightOverTime.Keys.Add(new CurveKey(0, height)); RotationOverTime = new Curve(); RotationOverTime.Keys.Add(new CurveKey(0, init_rotate)); OriginXOverTime = new Curve(); OriginXOverTime.Keys.Add(new CurveKey(0, origin_x)); OriginYOverTime = new Curve(); OriginYOverTime.Keys.Add(new CurveKey(0, origin_y)); AlphaOverTime = new Curve(); AlphaOverTime.Keys.Add(new CurveKey(0, alpha)); color = Color.White; color.A = alpha; }
public MiAnimatingComponent(MiGame game, int init_x, int init_y, int width, int height, float init_rotate, float origin_x, float origin_y, byte alpha) : base(game) { spriteQueue = new Dictionary<Enum, Queue<KeyValuePair<Texture2D, int>>>(); spriteQueueTimer = 0; SpriteState = SpriteStates.DEFAULT; moveTimer = 0; boundingRectangle = new Rectangle(init_x, init_y, width, height); rotation = init_rotate; origin = new Vector2(origin_x, origin_y); XPositionOverTime = new Curve(); XPositionOverTime.Keys.Add(new CurveKey(0, init_x)); YPositionOverTime = new Curve(); YPositionOverTime.Keys.Add(new CurveKey(0, init_y)); WidthOverTime = new Curve(); WidthOverTime.Keys.Add(new CurveKey(0, width)); HeightOverTime = new Curve(); HeightOverTime.Keys.Add(new CurveKey(0, height)); RotationOverTime = new Curve(); RotationOverTime.Keys.Add(new CurveKey(0, init_rotate)); OriginXOverTime = new Curve(); OriginXOverTime.Keys.Add(new CurveKey(0, origin_x)); OriginYOverTime = new Curve(); OriginYOverTime.Keys.Add(new CurveKey(0, origin_y)); AlphaOverTime = new Curve(); AlphaOverTime.Keys.Add(new CurveKey(0, alpha)); color = Color.White; color.A = alpha; }
public MiAnimatingComponent(MiGame game, float init_x, float init_y, float init_scale, float init_rotate, float origin_x, float origin_y, byte alpha) : base(game) { spriteQueue = new Queue<KeyValuePair<Texture2D, int>>(); spriteQueueTimer = 0; moveTimer = 0; position = new Vector2(init_x, init_y); scale = init_scale; rotation = init_rotate; origin = new Vector2(origin_x, origin_y); XPositionOverTime = new Curve(); XPositionOverTime.Keys.Add(new CurveKey(0, init_x)); YPositionOverTime = new Curve(); YPositionOverTime.Keys.Add(new CurveKey(0, init_y)); ScalingOverTime = new Curve(); ScalingOverTime.Keys.Add(new CurveKey(0, init_scale)); RotationOverTime = new Curve(); RotationOverTime.Keys.Add(new CurveKey(0, init_rotate)); OriginXOverTime = new Curve(); OriginXOverTime.Keys.Add(new CurveKey(0, origin_x)); OriginYOverTime = new Curve(); OriginYOverTime.Keys.Add(new CurveKey(0, origin_y)); AlphaOverTime = new Curve(); AlphaOverTime.Keys.Add(new CurveKey(0, alpha)); color = Color.White; color.A = alpha; }
public MiAnimatingComponent(MiGame game, int init_x, int init_y, int width, int height, float init_rotate, float origin_x, float origin_y) : this(game, init_x, init_y, width, height, init_rotate, origin_x, origin_y, 255) { }
public MiAnimatingComponent(MiGame game, int init_x, int init_y, int width, int height) : this(game, init_x, init_y, width, height, 0, 0, 0) { }
public MiScreen(MiGame game) : base(game) { Enabled = false; Visible = false; }
public MiComponent(MiGame game) : base(game) { Game = game; }
public MiDrawableComponent(MiGame game) : base(game) { Game = game; }
public MiInputHandler(MiGame game) : base(game) { }
public MiTileType(MiGame game, string texturePath, bool passable) : base(game) { this.texturePath = texturePath; this.passable = passable; }
public MiAnimatingComponent(MiGame game, float init_x, float init_y, float init_scale, float init_rotate, float origin_x, float origin_y) : this(game, init_x, init_y, init_scale, init_rotate, origin_x, origin_y, 255) { }
public MiAnimatingComponent(MiGame game, float init_x, float init_y) : this(game, init_x, init_y, 1, 0, 0, 0) { }
public MiAnimatingComponent(MiGame game) : this(game, 0, 0, 1, 0, 0, 0) { }
public MiScriptEngine(MiGame game) : base(game) { }
public DialogScreen(MiGame game) : base(game) { }
public LocationUI(MiGame game, int x, int y, int width, int height, LocationData location) { this.game = game; Neighbors = new Dictionary<MiControl, LocationUI>(); allyButtonBase = new MiAnimatingComponent(game, x, y, width, height); enemyButtonBase = new MiAnimatingComponent(game, x, y, width, height); neutralButtonBase = new MiAnimatingComponent(game, x, y, width, height); this.location = location; }
public WorldScreen(MiGame game) : base(game) { if (Instance == null) { background = new MiAnimatingComponent(game, 0, 0, 1280, 800); // // Create UI for Locations // LocationUI test_1 = new LocationUI(game, 150, 150, 64, 64, LocationData.TEST_1); LocationUI test_2 = new LocationUI(game, 150, 350, 64, 64, LocationData.courtyard); LocationUI test_3 = new LocationUI(game, 150, 550, 64, 64, LocationData.cafe); LocationUI test_4 = new LocationUI(game, 350, 150, 64, 64, LocationData.Erty); LocationUI test_5 = new LocationUI(game, 350, 350, 64, 64, LocationData.hall); LocationUI test_6 = new LocationUI(game, 350, 550, 64, 64, LocationData.HOME); LocationUI test_7 = new LocationUI(game, 550, 150, 64, 64, LocationData.mindclass); LocationUI test_8 = new LocationUI(game, 550, 350, 64, 64, LocationData.weaponclass); LocationUI test_9 = new LocationUI(game, 550, 550, 64, 64, LocationData.willclass); //LocationUI test_3 = new LocationUI(game, 650, 250, 128, 128, LocationData.TEST_3); LocationData.TEST_1.ControllingFaction = LocationData.State.ENEMY; // // Add Neighbors // test_1.Neighbors.Add(Controller.DOWN, test_2); test_1.Neighbors.Add(Controller.RIGHT, test_4); test_2.Neighbors.Add(Controller.UP, test_1); test_2.Neighbors.Add(Controller.DOWN, test_3); test_2.Neighbors.Add(Controller.RIGHT, test_5); test_3.Neighbors.Add(Controller.UP, test_2); test_3.Neighbors.Add(Controller.DOWN, test_4); test_3.Neighbors.Add(Controller.RIGHT, test_6); test_4.Neighbors.Add(Controller.UP, test_3); test_4.Neighbors.Add(Controller.DOWN, test_5); test_4.Neighbors.Add(Controller.RIGHT, test_7); test_5.Neighbors.Add(Controller.UP, test_4); test_5.Neighbors.Add(Controller.DOWN, test_6); test_5.Neighbors.Add(Controller.RIGHT, test_8); test_6.Neighbors.Add(Controller.UP, test_5); test_6.Neighbors.Add(Controller.DOWN, test_7); test_6.Neighbors.Add(Controller.RIGHT, test_9); test_7.Neighbors.Add(Controller.UP, test_6); test_7.Neighbors.Add(Controller.DOWN, test_8); test_7.Neighbors.Add(Controller.RIGHT, test_1); test_8.Neighbors.Add(Controller.UP, test_7); test_8.Neighbors.Add(Controller.DOWN, test_9); test_8.Neighbors.Add(Controller.RIGHT, test_2); test_9.Neighbors.Add(Controller.UP, test_8); test_9.Neighbors.Add(Controller.DOWN, test_1); test_9.Neighbors.Add(Controller.RIGHT, test_3); // // Add All Locations to Global List // allLocations = new List<LocationUI>(); allLocations.Add(test_1); allLocations.Add(test_2); allLocations.Add(test_3); allLocations.Add(test_4); allLocations.Add(test_5); allLocations.Add(test_6); allLocations.Add(test_7); allLocations.Add(test_8); allLocations.Add(test_9); // // Default Active Location // activeLocation = test_1; // // Cursor // cursor = new MiAnimatingComponent(game, activeLocation.ButtonBase.Position.X -50, activeLocation.ButtonBase.Position.Y + 30, 33, 35); // // Responses to Input // inputResponses[Controller.UP] = Upped; inputResponses[Controller.DOWN] = Downed; inputResponses[Controller.LEFT] = Lefted; inputResponses[Controller.RIGHT] = Righted; inputResponses[Controller.A] = EnterLocation; inputResponses[Controller.START] = Escape; } else { throw new Exception("World Screen Already Initialized"); } }
public static void Init(MiGame game) { Scripts.game = game; }