Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// <summary>
- /// Возвращает GameObject
- /// </summary>
- /// <param name="objectType">Тип контрола</param>
- /// <param name="index">Индекс контрола</param>
- public GameObject this[ControlType objectType, int index]
- {
- get
- {
- switch (objectType)
- {
- case ControlType.Tumbler:
- return tumblers[index];
- case ControlType.Spinner:
- return spinners[index];
- case ControlType.Indicator:
- return indicators[index];
- case ControlType.Joystick:
- return joysticks[index];
- default:
- Debug.Log("Cant recognize panel object type [" + objectType + "]");
- return null;
- }
- }
- set
- {
- switch (objectType)
- {
- case ControlType.Tumbler:
- tumblers[index] = value; break;
- case ControlType.Spinner:
- spinners[index] = value; break;
- case ControlType.Indicator:
- indicators[index] = value; break;
- case ControlType.Joystick:
- joysticks[index] = value; break;
- default:
- Debug.Log("Cant recognize panel object type [" + objectType + "]");
- break;
- }
- }
- }
Add Comment
Please, Sign In to add comment