示例#1
0
    /// <summary>
    /// This function stores the modules
    /// </summary>
    /// <param name="module"></param>
    public void Store_Module(GameObject module)
    {
        if (Stored_Modules_game_object == null)
        {
            Stored_Modules_game_object = GameObject.Find("Stored_Modules");
        }
        ModuleSystemInfo module_info = module.GetComponent <ModuleSystemInfo>();

        if (module_info.is_command_module)
        {
            if (command_module != null)
            {
                command_module.HideMountPoints();
            }
            this.command_module = null;
        }
        ItemResorce ir = module.GetComponent <ItemResorce>();

        module_info.IteminStorage();
        module.transform.parent = Stored_Modules_game_object.transform;
        // if (!module_info.is_command_module) {
        //     inventory.Add(new InventoryManager.Item(ir.Item_type, module));
        // }
    }