public override bool changeWeapon(IWeapons changeWeapon) { if (changeWeapon.getName() == "Garra Letal") { _handsweapon = changeWeapon; weapons[0] = changeWeapon; return(true); } else if (changeWeapon.getName() == "Porrete") { _handsweapon = changeWeapon; weapons[0] = changeWeapon; return(true); } else if (changeWeapon.getName() == "Cajado") { _handsweapon = changeWeapon; weapons[0] = changeWeapon; return(true); } else { return(false); } }
public void Setup() { stubWeapons = MockRepository.GenerateStub<IWeapons>(); stubWeapons.Stub(me => me[WeaponType.RailGun]).Return(new RailGun(null)); mockEffect = MockRepository.GenerateStub<ILineEffect>(); view = new RailGunView(mockEffect); }
public override bool changeWeapon(IWeapons changeWeapon) { if (changeWeapon.getName() == "Cajado") { _handsweapon = changeWeapon; weapons[0] = changeWeapon; return(true); } else if (changeWeapon.getName() == "Porrete") { _handsweapon = changeWeapon; weapons[0] = changeWeapon; return(true); } else if (changeWeapon.getName() == "Besta") { _handsweapon = changeWeapon; weapons[0] = changeWeapon; return(true); } else if (changeWeapon.getName() == "Esfera de Ataque") { _handsweapon = changeWeapon; weapons[0] = changeWeapon; return(true); } else { return(false); } }
public BasePlayer(IPlayerSettings playerSettings, IPhysicsComponent physicsComponent, IBoundaryCollider boundaryCollider, IWeapons weapons, ITimer timer) { this.PlayerSettings = playerSettings; this.PlayerScore = new PlayerScore(); if (physicsComponent == null) this.PhysicsComponent = new DummyPhysicsComponent(); else this.PhysicsComponent = physicsComponent; this.PhysicsComponent.CollidedWithWorld += () => InContactWithLevel = true; this.PhysicsComponent.WasShot += Damage; this.Weapons = weapons; this.Weapons.DamagedAPlayer += (damage, physicsComp) => physicsComp.OnWasShot(this, damage); this.Timer = timer; this.BoundaryCollider = boundaryCollider; this.Health = BasePlayer.StartHealth; this.Status = PlayerStatus.Alive; this.Position = new Vector2(400, 100); this.PhysicsComponent.CollisionGroup = BasePlayer.CollisionGroup; }
public void Setup() { stubWeapons = MockRepository.GenerateStub<IWeapons>(); stubWeapons.Stub(me => me[WeaponType.RocketLauncher]).Return(new RocketLauncher(null)); ((RocketLauncher)stubWeapons[WeaponType.RocketLauncher]).Rockets.Add(new Rocket(Vector2.Zero, Vector2.Zero, new Frenetic.Physics.DummyPhysicsComponent())); mockEffects = MockRepository.GenerateStub<IEffect>(); view = new RocketLauncherView(mockEffects); }
public void SetUp() { stubPlayerSettings = MockRepository.GenerateStub<IPlayerSettings>(); stubPhysicsComponent = MockRepository.GenerateStub<IPhysicsComponent>(); stubBoundaryCollider = MockRepository.GenerateStub<IBoundaryCollider>(); stubWeapons = MockRepository.GenerateStub<IWeapons>(); stubTimer = MockRepository.GenerateStub<ITimer>(); player = new BasePlayer(stubPlayerSettings, stubPhysicsComponent, stubBoundaryCollider, stubWeapons, stubTimer); }
public void DrawWeapon(IWeapons weapons) { var railGun = weapons[WeaponType.RailGun] as RailGun; foreach (var slug in railGun.Slugs) { SetAndTriggerEffectParameters(slug); } }
public ArmyFactory(ISquads squads, IWeapons weapons, IArmors armors, IUsers users, IArmyCostLimitService costLimit) { this.squads = squads; this.weapons = weapons; this.armors = armors; this.users = users; this.costLimit = costLimit; }
public Animal() { _life = 3200; _mana = 30; _atackdamage = 80; _spelldamage = 20; _armorresist = 90; _magicresist = 20; _agility = 50; _allSpell = new Attack_Spell[1]; _allSpell[0] = new Bio(); weapons = new IWeapons[1]; }
public Zumbi() { _life = 2500; _mana = 20; _atackdamage = 40; _spelldamage = 20; _armorresist = 80; _magicresist = 90; _agility = 20; _allSpell = new Attack_Spell[1]; _allSpell[0] = new Intoxication(); weapons = new IWeapons[3]; _handsweapon = weapons[0]; }
public Warrior() { _life = 4000; _mana = 30; _atackdamage = 100; _spelldamage = 20; _armorresist = 80; _magicresist = 20; _agility = 50; _allSpell = new Attack_Spell[1]; _allSpell[0] = new Storm(); weapons = new IWeapons[2]; _handsweapon = weapons[0]; }
public Troll() { _life = 2800; _mana = 20; _atackdamage = 100; _spelldamage = 20; _armorresist = 100; _magicresist = 20; _agility = 20; _allSpell = new Attack_Spell[1]; _allSpell[0] = new Intoxication(); weapons = new IWeapons[2]; _handsweapon = weapons[0]; }
public Dragon() { _life = 3000; _mana = 40; _atackdamage = 100; _spelldamage = 20; _armorresist = 100; _magicresist = 50; _agility = 80; _allSpell = new Attack_Spell[1]; _allSpell[0] = new Fire_Breath(); weapons = new IWeapons[2]; _handsweapon = weapons[0]; }
public Thief() { _life = 2800; _mana = 50; _atackdamage = 50; _spelldamage = 30; _armorresist = 40; _magicresist = 50; _agility = 100; _allSpell = new Attack_Spell[2]; _allSpell[0] = new Intoxication(); _allSpell[1] = new Storm(); weapons = new IWeapons[4]; _handsweapon = weapons[0]; }
public static async Task <Weapon> LoadAsync(IWeapons repository, string name) { var data = await repository.GetByNameAsync(name); var weapon = new Weapon(data.Name); weapon.cost = new Cost(data.Cost); weapon.offence = data.Offence .Select(LoadOffence) .ToList(); weapon.tags = data.Tags .Select(tag => new Tag(tag)) .ToList(); return(weapon); }
public Mage() { _life = 2500; _mana = 100; _atackdamage = 40; _spelldamage = 100; _armorresist = 30; _magicresist = 100; _agility = 40; _healSpell = new Healing_Spell[2]; _healSpell[0] = new Potion_of_Life(); _healSpell[1] = new Heal(); _allSpell = new Attack_Spell[4]; weapons = new IWeapons[2]; _handsweapon = weapons[0]; }
public void DrawWeapon(IWeapons weapons) { var rocketLauncher = weapons[WeaponType.RocketLauncher] as RocketLauncher; foreach (var rocket in rocketLauncher.Rockets) { this.ParticleEffects.Position = rocket.Position; if (rocket.IsAlive) { this.ParticleEffects.Trigger(EffectType.RocketTrail); } else { this.ParticleEffects.Trigger(EffectType.RocketExplosion); } } }
public Paladin() { _life = 3200; _mana = 80; _atackdamage = 60; _spelldamage = 60; _armorresist = 60; _magicresist = 60; _agility = 60; weapons = new IWeapons[2]; _healSpell = new Healing_Spell[1]; _healSpell = new Potion_of_Life[0]; _handsweapon = weapons[0]; _allSpell = new Attack_Spell[3]; _allSpell[0] = new Bio(); _allSpell[1] = new Cold_Flame(); _allSpell[2] = new Storm(); }
/// <summary> /// Troca a arma para a mão no vetor de armas, utilizando uma interface. /// </summary> /// <param name="changeWeapon">Interface IWeapon's </param> /// <param name="_handsweapon">Arma que está sendo usada </param> /// <returns></returns> public override bool changeWeapon(IWeapons changeWeapon) { if (changeWeapon.getName() == "Cajado") { _handsweapon = changeWeapon; weapons[0] = changeWeapon; return(true); } else if (changeWeapon.getName() == "Tridente Sagrado") { _handsweapon = changeWeapon; weapons[0] = changeWeapon; return(true); } else { return(false); } }
public override bool changeWeapon(IWeapons changeWeapon) { if (changeWeapon.getName() == "Espada Barroca") { _handsweapon = changeWeapon; weapons[0] = changeWeapon; return(true); } else if (changeWeapon.getName() == "Porrete") { _handsweapon = changeWeapon; weapons[0] = changeWeapon; return(true); } else { return(false); } }
public abstract bool changeWeapon(IWeapons changeWeapon);
private void NewWeaponPickedUp() { _currentWeapon = InventoryManager._currentWeaponClone.GetComponent <IWeapons>(); }
public WeaponsController(IWeapons weaponService) { _weaponService = weaponService; }
public const float SMOOTHING_FACTOR = 0.8f; // 1f tries to catch up completely between each tick and is likely to be unstable public NetworkPlayer(IPlayerSettings playerSettings, IPhysicsComponent physicsComponent, IWeapons weapons, ITimer timer) : base(playerSettings, physicsComponent, null, weapons, timer) { LastReceivedPosition = this.Position; }
private void Start() { _weaponsLists = InventoryManager.instance.weaponsList; _currentWeapon = _weaponsLists[0].GetComponent <IWeapons>(); }
public LocalPlayer(IPlayerSettings playerSettings, IPhysicsComponent physicsComponent, IBoundaryCollider boundaryCollider, IWeapons weapons, ITimer timer) : base(playerSettings, physicsComponent, boundaryCollider, weapons, timer) { Console.Write("Creating Local Player"); }
private void UpdatePlayerWeaponsAfterDraw(IWeapons weapons) { // Once we've drawn explosions, we clear the dead projectiles. weapons.RemoveDeadProjectiles(); }
private void OutAmmoAutoRemove() { _currentWeapon = InventoryManager._currentWeaponClone.GetComponent <IWeapons>(); }