void OnFurnitureChanged(FURNITURE funit) { foreach (GameObject it in roomItems) { if (it.name == funit.ToString()) { camMov.target = it.transform; } } }
public override void Draw() { base.Draw(); mesh = ScriptableGUIUtils.DrawObjectField("Mesh", mesh); /* color = ScriptableGUIUtils.DrawField("Color", color);*/ material = ScriptableGUIUtils.DrawObjectField("material", material); furnitureType = (FURNITURE)ScriptableGUIUtils.DrawField("furnitureType", furnitureType); Inventory_frameColor = ScriptableGUIUtils.DrawField("Inventory_FrameColor", Inventory_frameColor); Inventory_image = ScriptableGUIUtils.DrawObjectField("Inventory_icon", Inventory_image); isDefault = ScriptableGUIUtils.DrawField("isDefault?", isDefault); ScriptableGUIUtils.DrawList("ItemVariants", variants); }
/* private void SetDefaultConfig() * { * var cfg = new RoomConfig(); * * foreach (string name in Enum.GetNames(typeof(FURNITURE))) * { * if (ScriptableList<RoomItemConfig>.instance.GetItemByID("default" + name) != null) * { * cfg.AddItemToConfig(ScriptableList<RoomItemConfig>.instance.GetItemByID("default" + name)); * } * } * * defaultConfig = cfg; * }*/ private void OnFurnitureChanged(FURNITURE furniture) { _furniture = furniture; InitializeSkins(); }
public void InitializeInventory(FURNITURE furniture) { furniture_type = furniture; RefreshInventory(); }