private void TestThatTwoHandedWeaponsCannotBeEquippedWithOffHands(EquipmentClass testCandidate) { PlayerEquipmentSlots playerEquipment = new PlayerEquipmentSlots(); EquipmentClass offHand = new OneHandedSword(); playerEquipment.EquipInOffHand(offHand); playerEquipment.EquipInMainHand(testCandidate); EquipmentClass mainHandEquipment = playerEquipment.GetMainHandEquipment(); Assert.That(mainHandEquipment, Is.Null); offHand = new OneHandedMace(); playerEquipment.EquipInOffHand(offHand); playerEquipment.EquipInMainHand(testCandidate); mainHandEquipment = playerEquipment.GetMainHandEquipment(); Assert.That(mainHandEquipment, Is.Null); offHand = new Wand(); playerEquipment.EquipInOffHand(offHand); playerEquipment.EquipInMainHand(testCandidate); mainHandEquipment = playerEquipment.GetMainHandEquipment(); Assert.That(mainHandEquipment, Is.Null); offHand = new Shield(); playerEquipment.EquipInOffHand(offHand); playerEquipment.EquipInMainHand(testCandidate); mainHandEquipment = playerEquipment.GetMainHandEquipment(); Assert.That(mainHandEquipment, Is.Null); offHand = new ForceShield(); playerEquipment.EquipInOffHand(offHand); playerEquipment.EquipInMainHand(testCandidate); mainHandEquipment = playerEquipment.GetMainHandEquipment(); Assert.That(mainHandEquipment, Is.Null); offHand = new ArrowQuiver(); playerEquipment.EquipInOffHand(offHand); playerEquipment.EquipInMainHand(testCandidate); mainHandEquipment = playerEquipment.GetMainHandEquipment(); Assert.That(mainHandEquipment, Is.Null); offHand = new BoltQuiver(); playerEquipment.EquipInOffHand(offHand); playerEquipment.EquipInMainHand(testCandidate); mainHandEquipment = playerEquipment.GetMainHandEquipment(); Assert.That(mainHandEquipment, Is.Null); }
public void TestThatForceShieldsCanOnlyBeEquippedWithOneHandedWeapons() { EquipmentClass offHand = new ForceShield(); EquipmentClass secondOffHandInstance = new ForceShield(); TestThatOffHanderCanOnlyBeEquippedWithOneHander(offHand, secondOffHandInstance); }
protected void GetComponentMethod() { rg = this.GetComponent <Rigidbody>(); FlightM = this.GetComponent <ReFlightMode>(); FireBulletS = this.GetComponent <FireBullet>(); Hppoint = GameObject.Find("DEMO_GM").GetComponent <Hp>(); CrossDot = GameObject.Find("Dot").GetComponent <CrossHair>(); ForceShield = GameObject.Find("PlayerShield").GetComponent <ForceShield>(); }
public void TestThatCrossBowsCannotBeEquippedWithWeaponsOrShields() { PlayerEquipmentSlots playerEquipment = new PlayerEquipmentSlots(); EquipmentClass testCandidate = new CrossBow(); EquipmentClass offHand = new OneHandedSword(); playerEquipment.EquipInOffHand(offHand); playerEquipment.EquipInMainHand(testCandidate); EquipmentClass mainHandEquipment = playerEquipment.GetMainHandEquipment(); Assert.That(mainHandEquipment, Is.Null); testCandidate = new CrossBow(); offHand = new OneHandedMace(); playerEquipment.EquipInOffHand(offHand); playerEquipment.EquipInMainHand(testCandidate); mainHandEquipment = playerEquipment.GetMainHandEquipment(); Assert.That(mainHandEquipment, Is.Null); testCandidate = new CrossBow(); offHand = new Wand(); playerEquipment.EquipInOffHand(offHand); playerEquipment.EquipInMainHand(testCandidate); mainHandEquipment = playerEquipment.GetMainHandEquipment(); Assert.That(mainHandEquipment, Is.Null); testCandidate = new CrossBow(); offHand = new Shield(); playerEquipment.EquipInOffHand(offHand); playerEquipment.EquipInMainHand(testCandidate); mainHandEquipment = playerEquipment.GetMainHandEquipment(); Assert.That(mainHandEquipment, Is.Null); testCandidate = new CrossBow(); offHand = new ForceShield(); playerEquipment.EquipInOffHand(offHand); playerEquipment.EquipInMainHand(testCandidate); mainHandEquipment = playerEquipment.GetMainHandEquipment(); Assert.That(mainHandEquipment, Is.Null); }
// Use this for initialization void Start() { knownSpells = new Spell[spellSlots]; knownSpells[0] = new Fireball(1.5f, 1.0f, 30f, Spell.SpellAnimation.Standard, 0f); knownSpells[1] = new Blink(0.6f, 6f, 40f, Spell.SpellAnimation.AreaAttack, 1f, 15f); knownSpells[2] = new Rejuvenation(2f, 12f, 50f, Spell.SpellAnimation.Buff, -0.3f); knownSpells[3] = new LunarBeam(1f, 1.5f, 10f, Spell.SpellAnimation.Beam, 0f, 20f); //knownSpells[3] = new LunarBeam(0.3f, 0.2f, 5f, Spell.SpellAnimation.Beam, 0f, 5f); knownSpells[4] = new ForceShield(1f, 30f, 10f, Spell.SpellAnimation.Buff, 0f, 100f); currentSelectedSpell = knownSpells[0]; AddOnStartCastingListener(StartCasting); AddOnStopCastingListener(StopCasting); AddOnFinishSpellCastListener(FinishSpellCast); }
private void TestThatOneHandedWeaponCanBeEquippedWithShieldAndForceShield(EquipmentClass equipmentWithShield, EquipmentClass equipmentWithForceShield) { PlayerEquipmentSlots playerEquipment = new PlayerEquipmentSlots(); EquipmentClass shield = new Shield(); playerEquipment.EquipInOffHand(shield); playerEquipment.EquipInMainHand(equipmentWithShield); EquipmentClass mainHandEquipment = playerEquipment.GetMainHandEquipment(); Assert.That(mainHandEquipment, Is.EqualTo(equipmentWithShield)); EquipmentClass forceShield = new ForceShield(); playerEquipment.EquipInOffHand(forceShield); playerEquipment.EquipInMainHand(equipmentWithForceShield); mainHandEquipment = playerEquipment.GetMainHandEquipment(); Assert.That(mainHandEquipment, Is.EqualTo(equipmentWithForceShield)); }
public override void Initialize() { effect = GetComponent <ForceShield>(); ShieldsRaised = false; }
public void TestThatForceShieldCanBeEquippedInOffHandWithNothingPresent() { EquipmentClass testCandidate = new ForceShield(); TestThatGivenEquipmentCanBeEequippedInOffHandSlot(testCandidate); }