Пример #1
0
 //Copy constructor
 public Weapon(Weapon w)
 {
     Projectile = w.Projectile;
     this.HeadingOffsets = new List<double>();
     foreach (var d in w.HeadingOffsets)
         HeadingOffsets.Add(d);
     MaxCooldown = w.MaxCooldown;
     AccOffset = w.AccOffset;
     CurrCooldown = 0;
     Heading = w.Heading;
 }
Пример #2
0
        private void InitializeBases()
        {
            ActorHull = new Hull(75, 5, 2);
            PlayerHull = new Hull(100, 5, 2);
            ProjectileHull = new Hull(1, -1, 0);

            baseDestroy = new EffectDestroy();
            baseDamage = new EffectDamage(20);

            baseEngine1 = new Engine(5, 50);
            baseEngine2 = new Engine(10, 100);
            baseEngine3 = new Engine(2, 20);
            Vector2 v = new Vector2(0, 0);
            baseFriendlyActor = new Actor(v, 10, baseEngine1, PlayerHull, Device);
            //baseFriendlyActor.AddEffect(baseDestroy);
            baseFriendlyActor.SetCollision(0);
            baseEnemyActor = new Actor(v, 10, baseEngine3, ActorHull, Device);
            baseEnemyActor.SetCollision(2);
            //baseEnemyActor.AddEffect(baseDestroy);
            baseProjectile1 = new Actor(v, 5, baseEngine2, ProjectileHull, Device);
            baseProjectile1.AddEffect(baseDamage);
            baseProjectile1.SetCollision(1);
            //baseProjectile1.AddEffect(baseDestroy);
            List<double> d = new List<double>();
            for (int i = 0; i < 3; i++)
                d.Add(0);
            baseWeapon1 = new Weapon(baseProjectile1, d, 0.075f, 0.12);

            InitializeAIStartStop();
            InitializeAICloseStop();
            InitializeAIHoming();
        }
Пример #3
0
 public void AddWeapon(Weapon w)
 {
     this.WeaponList.Add(new Weapon(w));
 }