public virtual void Setup() { Character MagicGladiador = new Gladiador("MagicGladiador"); Character KingTroll = new Troll("KingTroll"); Character QueenElf = new Elf("QueenElf"); Character MagicWizard = new Wizard("MagicWizard"); IItem PinkyBow = new BowAndArrow(); IItem IcedCup = new Ice(); QueenElf.AddItem(IcedCup); QueenElf.AddItem(PinkyBow); IItem Blade = new LightSaber(); IItem Axe = new FireAx(); KingTroll.AddItem(Blade); KingTroll.AddItem(Axe); IItem Saber = new LightSaber(); IItem BlueRobe = new Robes(); MagicWizard.AddItem(Saber); MagicWizard.AddItem(Blade); IItem ChainArmor = new CompleteArmor(); InfiniteGauntlet Gauntlet = new InfiniteGauntlet(); Gauntlet.AddStone(); MagicGladiador.AddItem(ChainArmor); MagicGladiador.AddItem(Gauntlet); characters.Add(MagicGladiador); characters.Add(KingTroll); characters.Add(QueenElf); characters.Add(MagicWizard); }
public Knights() { Name = "Jedi Knights"; Description = "Elite warriors that are highly skilled with the force and lightsabers."; StandardIssueWeapon = new LightSaber(); Soldiers = new List <ICharacter>(); }
// Use this for initialization void Start() { controller = GetComponent <Controller2D>(); lightSaber = GetComponentInChildren <LightSaber>(); aim = GetComponent <AimingController>(); teleporte = GetComponent <Teleporter>(); playerMaterial = GetComponent <Renderer>().sharedMaterial; netTrans = GetComponent <NetworkTransform>(); if (gameObject.layer == LayerMask.NameToLayer("Player")) { lightSaber.collisionlayerMask = LayerMask.GetMask("Enemy"); } else { lightSaber.collisionlayerMask = LayerMask.GetMask("Player"); } lightSaber.collisionTest = isServer; EventSwingSaberEvent += lightSaber.Swing; initialMoveSpeed = moveSpeed; gravity = -(2 * jumpHeight) / Mathf.Pow(timeToJumpApex, 2); jumpVelocity = Mathf.Abs(gravity) * timeToJumpApex; print("Gravity: " + gravity + " Jump Velocity: " + jumpVelocity); targetVelocityX = 0; accelerationTimeAirorne = 0; accelerationTimeGrounded = 0; isAttacking = false; isDodging = false; controller.horizontalRayCount = (int)(controller.horizontalRayCount * transform.localScale.x); controller.verticalRayCount = (int)(controller.verticalRayCount * transform.localScale.y); jumpHeight *= transform.localScale.y; moveSpeed *= transform.localScale.x; wallJumpClimb.x *= transform.localScale.x; wallJumpClimb.y *= transform.localScale.y; wallJumpOff.x *= transform.localScale.x; wallJumpOff.y *= transform.localScale.y; wallLeap.x *= transform.localScale.x; wallLeap.y *= transform.localScale.y; }
private static void AddLightSaber(IVendingMachine machine, int amount) { LightSaber lightSaber = new LightSaber(); machine.AddItem(lightSaber, amount); }
public Jedi() { Weapon = new LightSaber(); }
// Use this for initialization void Start() { LightSaber lightsaber = GetComponent <LightSaber> (); lightsaber.StartUsing(lightsaber.gameObject); }
public Equipment CreateEquipment(string equipmentName) { Equipment eq = null; if (this.equipmentDict[equipmentName] == 5001) { //铁盔 eq = new Chael_de_fer(); } else if (this.equipmentDict[equipmentName] == 5002) { //伏魔刀 eq = new GhostSword(); } else if (this.equipmentDict[equipmentName] == 5003) { //刃甲 eq = new BladeMail(); } else if (this.equipmentDict[equipmentName] == 5004) { //金乌腿甲 eq = new GoldenCrowCuish(); } else if (this.equipmentDict[equipmentName] == 5005) { //白银护腕 eq = new SilverWristbands(); } else if (this.equipmentDict[equipmentName] == 5006) { //杉木戒指 eq = new CedarwoodRing(); } else if (this.equipmentDict[equipmentName] == 5007) { //灵能头巾 eq = new PsionicScarf(); } else if (this.equipmentDict[equipmentName] == 5008) { //光剑 eq = new LightSaber(); } else if (this.equipmentDict[equipmentName] == 5009) { //琉璃背心 eq = new ColouredGlazeVest(); } else if (this.equipmentDict[equipmentName] == 5010) { //灵风裤 eq = new SpiritWindPants(); } else if (this.equipmentDict[equipmentName] == 5011) { //红宝石护膝 eq = new RubyKneeProtector(); } else if (this.equipmentDict[equipmentName] == 5012) { //琥珀精华 eq = new AmberEssence(); } else if (this.equipmentDict[equipmentName] == 5013) { //大法师之帽 eq = new ArchmagesHat(); } else if (this.equipmentDict[equipmentName] == 5014) { //火灵杖 eq = new FireDorje(); } else if (this.equipmentDict[equipmentName] == 5015) { //智慧披风 eq = new WisdomCloak(); } else if (this.equipmentDict[equipmentName] == 5016) { //蚕丝裤 eq = new SilkPants(); } else if (this.equipmentDict[equipmentName] == 5017) { //魔女斗篷 eq = new SirenCloak(); } else if (this.equipmentDict[equipmentName] == 5018) { //贤者之石 eq = new StoneSage(); } return(eq); }