Esempio n. 1
0
        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;
            }
        }
Esempio n. 2
0
        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;
            }
        }
Esempio n. 3
0
        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>());
        }