Ejemplo n.º 1
0
 public ExplosionParticle(Projectile projectile, int num, Actor caster)
     : base(projectile, num, caster)
 {
     Random timeSeed = new Random();
     Random rnd = new Random(num + timeSeed.Next(0, 101));
     texture = Game1.contentRef.Load<Texture2D>(@"Textures/ExplosionParticle");
     velocity = (float)rnd.NextDouble();
     this.spawnTime = (int)Game1.totalMillis + 2500;
 }
Ejemplo n.º 2
0
        public HPParticle(Projectile projectile, int num, Actor caster)
        {
            Random rnd = new Random(num);
            this.position = projectile.position;
            this.angle = rnd.Next(0, 361);
            this.velocity = (float)rnd.NextDouble() / 5;
            this.caster = caster;
            this.spawnTime = (int)Game1.totalMillis + 5000;

            this.texture = Game1.contentRef.Load<Texture2D>(@"Textures/ShieldParticle");
        }
Ejemplo n.º 3
0
        public Projectile(Actor owner)
        {
            this.owner = owner;
            position = owner.position;
            angle = owner.angle;
            velocity = 10.0f;

            if (owner is Player)
                texture = Game1.contentRef.Load<Texture2D>(@"Textures/PlayerFire");
            else
                texture = Game1.contentRef.Load<Texture2D>(@"Textures/EnemyFire");
        }