public void ActiveMeleeMode() { Log.log("Activate"); //if the player get 100 energy's point the meleemode is active Log.log("energy " + this.character.GetStats().Energy); if (this.character.GetStats().Energy >= 100) { if (meleeMode == false) { isMeleeModeActivate = true; originAttAmount = character.GetStats().Attack; character.GetStats().SetAttack(100); originWeapon = this.character.GetActiveWeapon(); originSocket = this.character.GetActiveWeapon().sockets; Log.log("om basic weapon " + originWeapon.ToString()); character.ActivateWeapon(inventory.Weapons[7]); weapons[0] = this.character.GetActiveWeapon(); playerScript.isInvincible = true; hand1Obj.SetActive(false); hand2Obj.SetActive(false); meleeModeHands.SetActive(true); foreach (GameObject effect in meleeModeEffects) { effect.SetActive(true); } meleeMode = true; } else { Log.log("u cantt click twice"); } } else { Log.log("energy is not full"); } }
public override void Init(ICharacter character) { base.Init(character); foreach (Colors c in colors) { this.character.AddColor(c); } character.SetBulletColor(colors[0]); weapon = character.GetActiveWeapon(); character.OnWeaponChange += OnWeaponChange; aimDir = Vector3.down; weapon = character.GetActiveWeapon(); character.OnWeaponChange += OnWeaponChange; aimDir = Vector3.down; CreateNewWeapon(); OnWeaponChange(character.GetInventory().Weapons[0]); character.ActivateWeapon(character.GetInventory().Weapons[0]); }
void ActivateWeapon(int index /*,Weapon weapon*/) { character.ActivateWeapon(character.GetInventory().Weapons[index]); }