Inheritance: GrandLarceny.MovingObject
Ejemplo n.º 1
0
 public DeathScene(LinkedList<GameObject>[] a_gameObjects, Texture2D a_background)
 {
     m_background = a_background;
     if (Game.getInstance().getState() is GameState)
     {
         m_levelName = ((GameState)Game.getInstance().getState()).getLevelName();
         m_progressName = Game.getInstance().getProgress().getName();
     }
     else
     {
         throw new InvalidCastException("DeathScene can only be created when in GameState");
     }
     m_gameObjects = a_gameObjects;
     m_player = Game.getInstance().getState().getPlayer();
 }
Ejemplo n.º 2
0
 public DeathScene(LinkedList<GameObject>[] a_gameObjects)
 {
     if (File.Exists("Content\\levels\\Checkpoint.lvl"))
     {
         m_levelName = "Checkpoint.lvl";
     }
     else if (Game.getInstance().getState() is GameState)
     {
         m_levelName = ((GameState)Game.getInstance().getState()).getLevelName();
     }
     else
     {
         throw new InvalidCastException("DeathScene can only be created when in GameState");
     }
     m_gameObjects = a_gameObjects;
     m_player = Game.getInstance().getState().getPlayer();
 }
Ejemplo n.º 3
0
 public override void loadContent()
 {
     m_player = Game.getInstance().getState().getPlayer();
     base.loadContent();
     m_line.setStartPoint(m_player.getPosition().getGlobalCartesian());
     m_line.setEndPoint(m_line.getStartPoint());
     m_position.setGlobalCartesian(m_player.getPosition().getGlobalCartesian());
     m_moveToStart = false;
     timeToLive = (float)Game.getInstance().getTotalGameTime().TotalMilliseconds + 200;
 }
Ejemplo n.º 4
0
 public static void createPlayer(Vector2 a_position)
 {
     if (Game.getInstance().getState().getPlayer() == null) {
         m_state = Game.getInstance().getState();
         Player t_player = new Player(m_state.getTileCoordinates(a_position), "Images//Sprite//Hero//hero_stand", 0.300f);
         m_state.setPlayer(t_player);
         m_state.addObject(t_player);
     }
 }
Ejemplo n.º 5
0
 public override void setPlayer(Player a_player)
 {
     m_player = a_player;
 }
Ejemplo n.º 6
0
 public virtual void setPlayer(Player a_player)
 {
 }