using System.Collections; using System.Collections.Generic; using UnityEngine; using Sirenix.OdinInspector; using KairoEngine.Inventory; namespace KairoEngine.CharacterSystem { public enum WorldObjectType { Character, Item, ItemContainer } public class WorldObject : MonoBehaviour { public WorldObjectType objectType; [ShowIf("@objectType == WorldObjectType.Character")] public CharacterController character; [ShowIf("@objectType == WorldObjectType.Item")] public WorldItem item; [ShowIf("@objectType == WorldObjectType.ItemContainer")] public WorldItemContainer itemContainer; public bool IsCharacter() => objectType == WorldObjectType.Character; public bool IsItem() => objectType == WorldObjectType.Item; public bool IsItemContainer() => objectType == WorldObjectType.ItemContainer; } }