Beispiel #1
0
        public Floor(Zone zone)
        {
            m_zone = zone;

            m_backgroundRenderer = new SpriteRenderer(GrassTexture.Instance.SpriteSheet);
            m_backgroundInstance = m_backgroundRenderer.AddSprite(GrassTexture.Instance.Sprite);
        }
        public EnnemyManager(int ennemiesCount = 10)
        {
            m_ennemies = new List<Ennemy>();
            m_ennemiesCount = ennemiesCount;
            m_ennemiesCountInitial = ennemiesCount;
            m_random = new Random();

            m_renderer = new SpriteRenderer(EnnemiesSprites.Instance);
        }
Beispiel #3
0
        //public ParticleEngine ParticleEngine { get; set; }
        public Zone(Map map, Vector2i id)
        {
            m_id = id;
            m_map = map;
            Walls = new List<Wall>();
            Lights = new List<Light>();
            Trees = new List<Tree>();
            m_wallRenderer = new SegmentRenderer();
            m_lightRenderer = new TriangleFanRenderer();
            Floor = new Floor(this);
            m_treeRenderer = new SpriteRenderer(TreesSprites.Instance);

            Generate();
        }
Beispiel #4
0
        public FireCamp()
        {
            m_location = new LocationComponent(this);
            m_rigidBody = new RigidBodyComponent(this, m_location);
            m_renderer = new SpriteRenderer(FireSprites.Instance);
            m_box = new Vector2(48, 48);

            m_sequence = new SpriteSequence(
                FireSprites.Instance.Camp1,
                FireSprites.Instance.Camp2,
                FireSprites.Instance.Camp3,
                FireSprites.Instance.Camp4,
                FireSprites.Instance.Camp5
            );

            m_sequence.SpritesPerSecond = 7;

            SetSprite(m_renderer);
        }
Beispiel #5
0
        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 SpriteInstance(SpriteRenderer renderer, Sprite sprite)
 {
     m_renderer = renderer;
     m_sprite = sprite;
 }
Beispiel #7
0
 //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.Z4Front1);
 }
Beispiel #8
0
        public override void SetSprite(SpriteRenderer renderer)
        {
            m_sprite = renderer.AddSprite(TreesSprites.Instance.Arbre20);

            UpdateSprite(TimeSpan.Zero, GetSpriteSequence());
        }
Beispiel #9
0
 public virtual void SetSprite(SpriteRenderer renderer)
 {
 }
 public BulletManager()
 {
     Bullets = new List<Bullet>();
     m_renderer = new SpriteRenderer(BulletSprites.Instance);
 }
 public BloodManager()
 {
     Bloods = new List<Blood>();
     m_renderer = new SpriteRenderer(BloodSprites.Instance);
     m_staticRenderer = new SpriteRenderer(BloodSprites.Instance);
 }
Beispiel #12
0
 public void SetSprite(SpriteRenderer renderer)
 {
     m_sprite = renderer.AddSprite(FireSprites.Instance.Camp1);
 }