示例#1
0
 public void SpecialAttack()
 {
     if (weaponName == "sniper")
     {
     }
     if (weaponName == "Gun")
     {
         tirtype = tirTypes.explosive;
     }
 }
示例#2
0
 public Tirs(Texture2D texture, int dammage, Vector2 position, Vector2 vitesse, int range, int numPerso, double angle, int nTexture, tirTypes type)
 {
     this.type     = type;
     this.angle    = angle;
     this.damage   = dammage;
     this.position = position;
     this.vitesse  = vitesse;
     this.texture  = texture;
     this.range    = range;
     this.numPerso = numPerso;
     this.nTexture = nTexture;
     distance      = 0;
     suprr         = false;
 }
示例#3
0
        public Weapon(int prix, string ammo, string image, int damage, double cadence, cadenceType cadenceType, int munitions, int currentAmo, int capacity, int accuracy, int range, Vector2 position, Vector2 speed, string weaponName, bool isOnMap, int id, ContentManager Content, SoundsName Sound, tirTypes tirtypes, bool hasSpecialAttack, int numBalle, int numArme)

            : base(TexturesGame.weaponTab[numArme], position, speed, isOnMap, Direction.right, new Vector2(0, 0), objectType.weapon, id)
        {
            this.shotSound        = Sound;
            this.tirtype          = tirtypes;
            this.hasSpecialAttack = hasSpecialAttack;
            this.prix             = prix;
            specialAttackEnabled  = false;
            this.ammo             = ammo;
            ammoTexture           = Tools.LoadTexture(ammo, Content);
            imagename             = image;
            name            = weaponName;
            this.damage     = damage;
            this.isOnMap    = true;
            this.cadence    = cadence;
            this.weaponType = cadenceType;
            this.accuracy   = accuracy;
            this.range      = range;
            this.munitions  = munitions;
            this.weaponName = weaponName;
            this.angle      = 0;
            autoTirs        = 0;
            this.currentAmo = currentAmo;
            this.capacity   = capacity;
            this.count2     = 0;
            scopeTexture    = Tools.LoadTexture("SpriteTexture/Others/Scope", Content);

            weaponSprite  = Tools.LoadTexture("Weapons/WeaponSprite/" + weaponName, Content);
            this.numArme  = numArme;
            this.numBalle = numBalle;

            rafalstirs = 0;

            if (weaponName == "FlameThrower")
            {
                nTexture = 1;
            }
            else
            {
                nTexture = 0;
            }
        }