Ejemplo n.º 1
0
 public Projectile(Spell spell, GameHandler game, Entity target, Entity owner)
 {
     this.spell = spell;
     this.game = game;
     this.target = target;
     this.owner = owner;
     arcCount = spell.arcCount;
     size = new Vector2(4.0f, 4.0f); //To load
     projTexture = new AnimatedTexture(Main.content.Load<Texture2D>("flyingProj"), 3, 0.5f, 4, 4); //To load/implement
 }
Ejemplo n.º 2
0
 public AnimatedTexture(AnimatedTexture anim)         //Clone constructor
 {
     texture  = anim.texture;
     hShift   = anim.hShift;
     offset   = anim.offset;
     w        = anim.w;
     h        = anim.h;
     curFrame = 0.0f;
     maxFrame = anim.maxFrame;
     speed    = anim.speed;
 }
Ejemplo n.º 3
0
        protected float curFrame; //Current frame (Float to allow incrementing every frame)

        #endregion Fields

        #region Constructors

        //Clone constructor
        public AnimatedTexture(AnimatedTexture anim)
        {
            texture = anim.texture;
            hShift = anim.hShift;
            offset = anim.offset;
            w = anim.w;
            h = anim.h;
            curFrame = 0.0f;
            maxFrame = anim.maxFrame;
            speed = anim.speed;
        }