Exemplo n.º 1
0
        /// <summary>
        /// Spawns a clone at the given position with the given direction.
        /// </summary>
        /// <param name="position"></param>
        /// <param name="direction"></param>
        public virtual void spawnClone(Vector2 position, Vector2 direction)
        {
            //AnimatedSprite newSprite = new AnimatedSprite(this.sprite.name, position, new AnimationManager(this.sprite.animation.objectTexture.Copy(), this.sprite.animation.defaultDrawFrame), this.color);
            SSCProjectile basic = new SSCProjectile(this.owner, new AnimatedSprite("DefaultProjectile", position, new AnimationManager(SeasideScramble.self.textureUtils.getExtendedTexture("Projectiles", "Basic"), new Animation(0, 0, 4, 4)), this.color), new Rectangle(this.hitBox.X, this.hitBox.Y, this.hitBox.Width, this.hitBox.Height), position, direction, this.speed, this.maxLifeSpan, this.scale, this.damage, this.effect);

            SeasideScramble.self.entities.projectiles.addProjectile(basic);
        }
Exemplo n.º 2
0
        //~~~~~~~~~~~~~~~~~~~~//
        //   Spawning Logic   //
        //~~~~~~~~~~~~~~~~~~~~//
        #region

        public void spawnDefaultProjectile(object Owner, Vector2 Position, Vector2 Direction, float Speed, Rectangle HitBox, Color Color, float Scale, int LifeSpan = 300)
        {
            SSCProjectile basic = new SSCProjectile(Owner, new StardustCore.Animations.AnimatedSprite("DefaultProjectile", Position, new StardustCore.Animations.AnimationManager(SeasideScramble.self.textureUtils.getExtendedTexture("Projectiles", "Basic"), new StardustCore.Animations.Animation(0, 0, 4, 4)), Color), HitBox, Position, Direction, Speed, LifeSpan, Scale, 1);

            this.addProjectile(basic);
        }
Exemplo n.º 3
0
 public void deleteProjectile(SSCProjectile projectile)
 {
     this.garbageCollection.Add(projectile);
     //this.projectiles.Remove(projectile);
 }
Exemplo n.º 4
0
 public void addProjectile(SSCProjectile projectile)
 {
     this.projectiles.Add(projectile);
 }