public override void OnInspectorGUI()
    {
        GunController gunController = target as GunController;

        if (DrawDefaultInspector())
        {
            gunController.Change();
        }

        if (GUILayout.Button("Change Gun"))
        {
            gunController.Change();
        }
    }
Beispiel #2
0
 // 무기 교체 함수.
 private void WeaponChange(string type, string name)
 {
     if (type == "GUN")
     {
         gunController.Change(gunDictionary[name]);
         hud.goBulletHUD.SetActive(true);
     }
     else if (type == "MELEE_WEAPON")
     {
         mwControllers[name].Change(meleeWeaponDictionary[name]);
         hud.goBulletHUD.SetActive(false);
     }
 }