/// <summary> Call this when you drop this weapon </summary> public void OnDrop(CharacterMasterAbstract newHolder) { OnUnequip(); holder = null; ctrl = null; anim = null; mvmt = null; }
/// <summary> Call this when you pickup or switch to this weapon </summary> /// <param name="newHolder"> The CharacterMasterAbstract of the character that just picked up this weapon </param> public void OnEquip(CharacterMasterAbstract newHolder) { holder = newHolder; // All hittable things minus this layer whatIsHittable = CommonObjectsSingleton.Instance.whatIsHittableMaster & ~(1 << holder.gameObject.layer); ctrl = holder.control; holder.weapon = this; anim = holder.anim; mvmt = holder.gameObject.GetComponent <MovementAbstract>(); }
private void Start() { _characterMaster = GetComponent <CharacterMasterAbstract>(); }