public Floor(Zone zone) { m_zone = zone; m_backgroundRenderer = new SpriteRenderer(GrassTexture.Instance.SpriteSheet); m_backgroundInstance = m_backgroundRenderer.AddSprite(GrassTexture.Instance.Sprite); }
public Background(Camera camera) { m_camera = camera; m_backgroundTexture_01 = Texture2D.Load(typeof(Background).Assembly.GetManifestResourceStream("Test.Game_01.Textures.Background_01.png")); m_backgroundSheet_01 = new SpriteSheet(m_backgroundTexture_01); m_backgroundSprite_01 = m_backgroundSheet_01.AddSprite("", new Box2i(Vector2i.Zero, m_backgroundTexture_01.Size)); m_backgroundRenderer_01 = new SpriteRenderer(m_backgroundSheet_01); m_backgroundInstance_01 = m_backgroundRenderer_01.AddSprite(m_backgroundSprite_01); m_backgroundTexture_02 = Texture2D.Load(typeof(Background).Assembly.GetManifestResourceStream("Test.Game_01.Textures.Background_02.png")); m_backgroundSheet_02 = new SpriteSheet(m_backgroundTexture_02); m_backgroundSprite_02 = m_backgroundSheet_02.AddSprite("", new Box2i(Vector2i.Zero, m_backgroundTexture_02.Size)); m_backgroundRenderer_02 = new SpriteRenderer(m_backgroundSheet_02); m_backgroundInstance_02_First = m_backgroundRenderer_02.AddSprite(m_backgroundSprite_02); m_backgroundInstance_02_Second = m_backgroundRenderer_02.AddSprite(m_backgroundSprite_02); }
public Player() { m_location = new LocationComponent(this); m_rigidBody = new RigidBodyComponent(this, m_location); m_renderer = new SpriteRenderer(PlayerSprites.Instance); m_sprite = m_renderer.AddSprite(PlayerSprites.Instance.StandRight); m_walkRightSequence = new SpriteSequence( PlayerSprites.Instance.WalkRight01, PlayerSprites.Instance.WalkRight02, PlayerSprites.Instance.WalkRight03, PlayerSprites.Instance.WalkRight04, PlayerSprites.Instance.WalkRight05, PlayerSprites.Instance.WalkRight06, PlayerSprites.Instance.WalkRight07, PlayerSprites.Instance.WalkRight08, PlayerSprites.Instance.WalkRight09, PlayerSprites.Instance.WalkRight10, PlayerSprites.Instance.WalkRight11 ); m_walkLeftSequence = new SpriteSequence( PlayerSprites.Instance.WalkLeft01, PlayerSprites.Instance.WalkLeft02, PlayerSprites.Instance.WalkLeft03, PlayerSprites.Instance.WalkLeft04, PlayerSprites.Instance.WalkLeft05, PlayerSprites.Instance.WalkLeft06, PlayerSprites.Instance.WalkLeft07, PlayerSprites.Instance.WalkLeft08, PlayerSprites.Instance.WalkLeft09, PlayerSprites.Instance.WalkLeft10, PlayerSprites.Instance.WalkLeft11 ); m_standRightSequence = new SpriteSequence(PlayerSprites.Instance.StandRight); m_standLeftSequence = new SpriteSequence(PlayerSprites.Instance.StandLeft); m_jumpRightSequence = new SpriteSequence(PlayerSprites.Instance.JumpRight); m_jumpLeftSequence = new SpriteSequence(PlayerSprites.Instance.JumpLeft); m_duckRightSequence = new SpriteSequence(PlayerSprites.Instance.DuckRight); m_duckLeftSequence = new SpriteSequence(PlayerSprites.Instance.DuckLeft); }
public Player() { m_location = new LocationComponent(this); m_rigidBody = new RigidBodyComponent(this, m_location); m_move = new MoveComponent(this, m_location); m_life = new LifeComponent(this, 100); m_box = new Vector2(32, 32); m_weapons = new Dictionary <string, Weapon>(); m_renderer = new SpriteRenderer(PlayerSprites.Instance); m_sprite = m_renderer.AddSprite(PlayerSprites.Instance.Front1); m_walkRightSequence = new SpriteSequence( PlayerSprites.Instance.Right1, PlayerSprites.Instance.Right2, PlayerSprites.Instance.Right3 ); m_walkLeftSequence = new SpriteSequence( PlayerSprites.Instance.Left1, PlayerSprites.Instance.Left2, PlayerSprites.Instance.Left3 ); m_walkFrontSequence = new SpriteSequence( PlayerSprites.Instance.Front1, PlayerSprites.Instance.Front2, PlayerSprites.Instance.Front3 ); m_walkBackSequence = new SpriteSequence( PlayerSprites.Instance.Back1, PlayerSprites.Instance.Back2, PlayerSprites.Instance.Back3 ); }
//public override void SetPosition(Vector2 position) //{ // m_location.SetPosition(position); // m_box = new Vector2(24, 27); //} public override void SetSprite(SpriteRenderer renderer) { m_sprite = renderer.AddSprite(EnnemiesSprites.Instance.Z6Front1); }
public void SetSprite(SpriteRenderer renderer) { m_sprite = renderer.AddSprite(FireSprites.Instance.Camp1); }
public override void SetSprite(SpriteRenderer renderer) { m_sprite = renderer.AddSprite(TreesSprites.Instance.Arbre11); UpdateSprite(TimeSpan.Zero, GetSpriteSequence()); }
public override void SetSprite(SpriteRenderer renderer) { m_sprite = renderer.AddSprite(BulletSprites.Instance.Bullet0); UpdateSprite(TimeSpan.Zero, GetSpriteSequence()); }
public override void SetSprite(SpriteRenderer renderer) { m_sprite = renderer.AddSprite(EnemiesSprites.Instance.SlimeWalkRight1); }