void OnMouseDown() { if (p_control.phase == GamePhase.Game) { string weapon = name.Remove(this.name.Length - 4); w_control.ChangeWeapon(weapon); print(weapon); } }
public static void ChangeWeapon(GameObject target, SkillWeaponInfo param) { WeaponControl control = target.GetComponent <WeaponControl>(); if (control == null) { LogicSystem.GfxLog("ShooterSkillExecutor WeaponControl Script miss!"); } control.ChangeWeapon(param); }