/// <summary> /// Constructor for the GPE /// </summary> /// <param name="a_world">World for the GPE to exist in</param> /// <param name="a_gameState">gamestate to manage the gravity of</param> /// <param name="a_texture">texture for the gravity bar</param> /// <param name="a_camera">camera that provides the viewport to draw in</param> /// <param name="a_player">player that handles the gravity bar</param> public GPE(World a_world, GameState a_gameState, Texture2D a_texture, Camera a_camera, Player a_player) { m_camera = a_camera; m_gameState = a_gameState; m_bar = new Sprite(a_world, a_texture, new Vector2(450, 40), 0, m_camera.Position + new Vector2(0, 200)); m_bar.m_body.BodyType = BodyType.Static; m_barBackground = new Sprite(a_world, a_texture, new Vector2(450, 40), 0, m_camera.Position + new Vector2(0, 200)); m_barBackground.m_body.BodyType = BodyType.Static; m_bar.m_body.CollisionCategories = Category.None; m_barBackground.m_body.CollisionCategories = Category.None; m_player = a_player; }
public void SetState(string a_name, GameState a_state) { m_avaliableStates[a_name] = a_state; }