public void SetLeftMeleeWeapon(Transform handler) { if (handler) { var meleeWeapon = handler.GetComponentInChildren <vMeleeWeapon>(); if (meleeWeapon) { if (currentMeleeWeaponRA != null && currentMeleeWeaponRA.useTwoHand) { DropRightWeapon(); } currentMeleeWeaponLA = meleeWeapon; currentMeleeWeaponLA.Init(); currentMeleeWeaponLA.hitProperties = this.hitProperties; SendMessage("SetCombatID", GetCombatID(), SendMessageOptions.DontRequireReceiver); } changeWeapon = false; } }
public void InitDefaultMeleeWeapon() { if (leftArmHitbox != null) { leftArmHitbox.Init(); leftArmHitbox.hitProperties = this.hitProperties; } if (leftLegHitbox != null) { leftLegHitbox.Init(); leftLegHitbox.hitProperties = this.hitProperties; } if (rightArmHitbox != null) { rightArmHitbox.Init(); rightArmHitbox.hitProperties = this.hitProperties; } if (rightLegHitbox != null) { rightLegHitbox.Init(); rightLegHitbox.hitProperties = this.hitProperties; } SendMessage("SetCombatID", GetCombatID(), SendMessageOptions.DontRequireReceiver); }