public override void Update() { if (DynamicTypeObject == null) { DynamicTypeObject = UITool.FindUIGameObject("DynamicType").GetComponent <Dropdown>(); } if (m_LevelUnit == null) { return; } switch (m_LevelUnit.defaultState) { case LevelUnitStates.Floor: m_Material.color = Color.red; return; case LevelUnitStates.Pit: m_Material.color = Color.blue; return; case LevelUnitStates.Cover: m_Material.color = Color.green; return; } }
public override void OnClick() { if (DynamicTypeObject == null) { DynamicTypeObject = UITool.FindUIGameObject("DynamicType").GetComponent <Dropdown>(); } if (m_LevelUnit == null) { return; } switch (DynamicTypeObject.value) { case 0: m_LevelUnit.defaultState = LevelUnitStates.Cover; m_Material.color = Color.green; return; case 1: m_LevelUnit.defaultState = LevelUnitStates.Floor; m_Material.color = Color.red; return; case 2: m_LevelUnit.defaultState = LevelUnitStates.Pit; m_Material.color = Color.blue; return; default: return; } }
public override void Init() { base.Init(); Stage = UITool.FindUIGameObject("StageList").GetComponent <Dropdown>(); m_GameObjects = new List <GameObject>(); map = new List <Dictionary <int, LevelUnitStates> >(Stage.options.Count); map.Add(new Dictionary <int, LevelUnitStates>()); map.Add(new Dictionary <int, LevelUnitStates>()); map.Add(new Dictionary <int, LevelUnitStates>()); }