//public float m_radius; public override void Init(Game1 inGame, Microsoft.Xna.Framework.Graphics.SpriteBatch a_sb, CLASSID a_type) { base.Init(inGame, a_sb, a_type); //m_classID = CLASSID.CLASSID_PLANET; //m_game.Content.Load<Texture2D>("planet"); m_rot = 0.0f; m_pos = new Vector2(0, 0); m_centre = new Vector2(0,0); m_radius = -1; // m_radius = GetRadius(m_sprite.Width, m_sprite.Height); }
private Boolean lastDir; //last direction the player was moving - used to set correct idle animation orientation etc - true is left public override void Init(Game1 inGame, SpriteBatch a_sb, CLASSID a_type) { lastDir = false; base.Init(inGame, a_sb, a_type); m_classID = CLASSID.CLASSID_PLAYER; //hard set mass and friction m_mass = 50.0f; m_friction = 10.0f; m_hasCollided = false; // m_sprite = m_game.Content.Load<Texture2D>("player"); m_rot = 0.0f; // m_centre = new Vector2(m_sprite.Width / 2, m_sprite.Height / 2); m_matrix *= Matrix.CreateTranslation(new Vector3(300,300,0)); m_heading = new Vector2(0, 0); // m_pos = new Vector2(m_matrix.Translation.X, m_matrix.Translation.Y); m_pos = new Vector2(0, 0); m_planetRot = 0f; m_gravHeading = new Vector2(0, 0); m_newPlanet = false; m_killUpVelocity = false; m_isJumping = false; m_jumpStates.Add("start"); m_jumpStates.Add("loop"); m_jumpStates.Add("end"); }
public virtual void Init(Game1 inGame, SpriteBatch a_sb, CLASSID a_type) { m_classID = a_type; m_game = inGame; m_sb = a_sb; m_spriteEffect = SpriteEffects.None; m_matrix = Matrix.Identity; m_drawCollision = true; m_scale = 1; m_lineTexture = m_game.Content.Load<Texture2D>("edge_plain"); m_classID = CLASSID.CLASSID_ACTOR; m_spriteManager = new SpriteManager(); //init the sprite manager m_spriteManager.Init(this); }