Esempio n. 1
0
 public AudioController(Game game, bool muted, bool playing)
     : base(game)
 {
     this.muted = muted;
     this.playing = playing;
     this.game = (LeGame)game;
 }
Esempio n. 2
0
 public OgreEntity(Game game, Vector2 location, float angle)
     : base(game)
 {
     this.game = (LeGame)game;
     this.location = location;
     this.angle = angle;
     isWalking = false;
 }
Esempio n. 3
0
 public StateManager(LeGame game)
 {
     Log("Creating states");
     menu = new StateMenu(game);
     single = new StateSingle(game);
     multi = new StateMulti(game);
     curState = LeGame.STARTING_STATE;
 }
Esempio n. 4
0
 public StateSingle(LeGame g)
     : base(g)
 {
     #region Entities Construction
     player = new PlayerEntity(game, LeGame.PLAYER_STARTING_LOCATION);
     ogre = new OgreEntity(game, LeGame.OGRE_STARTING_LOCATION, 0.0f);
     mouse = new MouseEntity(game);
     #endregion
     #region Component Construction
     environment = new TileEnvironment(game, player, LeGame.ENVIRONMENT_WIDTH, LeGame.ENVIRONMENT_HEIGHT);
     audioControl = new AudioController(game, false, false);
     #endregion
 }
Esempio n. 5
0
 public StateMenu(LeGame g)
     : base(g)
 {
     Log("Creating state");
     background = new ScrollBackground(game, "menu/background");
     mouse = new MouseEntity(game);
     singleColor = multiColor = optionsColor = exitColor = TEXT_COLOR;
     isTransitioning = true;
     doChangeState = false;
     transitionCount = 0;
     targetState = StateManager.State.Single;
     currentTransition = TransitionType.FadeIn;
 }
Esempio n. 6
0
 public PlayerEntity(Game game, Vector2 startLocation)
     : base(game)
 {
     this.parent = (LeGame)game;
     location = startLocation;
     previousLocation = startLocation;
     isMoving = false;
     isSprinting = false;
     canSprint = true;
     angle = 0.0f;
     collisionBoxSize = size - 5;
     drawLocation = Vector2.One;
     drawLocation.X = (float)((LeGame.CLIENT_SCREEN_WIDTH / 2.0) + (size / 2.0));
     drawLocation.Y = (float)((LeGame.CLIENT_SCREEN_HEIGHT / 2) + (size / 2));
 }
Esempio n. 7
0
 /// <summary>
 /// A vertically scrolling background.
 /// </summary>
 /// <param name="game">Instance of game class</param>
 /// <param name="path">Path to texture</param>
 public ScrollBackground(LeGame game, String path)
     : base(game)
 {
     this.game = game;
     this.texturePath = path;
 }
Esempio n. 8
0
 internal Weapon(LeGame g)
 {
     game = g;
     damage = 0.0f;
 }
Esempio n. 9
0
 public MouseEntity(LeGame game)
     : base(game)
 {
     screenArea = game.window;
     // screenArea = new Rectangle(0, 0, (int)LeGame.CLIENT_SCREEN_WIDTH, (int)(LeGame.CLIENT_SCREEN_RATIO * LeGame.CLIENT_SCREEN_WIDTH));
 }
Esempio n. 10
0
 public StateMulti(LeGame g)
     : base(g)
 {
 }
Esempio n. 11
0
 public GameState(LeGame g)
 {
     this.game = g;
 }