public void OptionTextChange(CommonAccessibles.Mode value)
    {
        dropDown.options.Clear();
        switch (value)
        {
        case CommonAccessibles.Mode.BUILD:
            string[] names = ReturnNameArray(buildingPlacement.implamentedBuildings);

            for (int i = 0; i < names.Length; i++)
            {
                dropDown.options.Add(new Dropdown.OptionData(names[i]));
            }
            dropDown.Show();
            break;

        case CommonAccessibles.Mode.PRODUCTION:


            string[] unames = ReturnNameArray(CommonAccessibles.CurrentBuilding.implamentedUnits);

            for (int i = 0; i < CommonAccessibles.CurrentBuilding.implamentedUnits.Count; i++)
            {
                dropDown.options.Add(new Dropdown.OptionData(unames[i]));
            }
            dropDown.Show();
            break;

        default:
        case CommonAccessibles.Mode.COMMAND:

            break;
        }
    }
Ejemplo n.º 2
0
    void ModeController(CommonAccessibles.Mode val)
    {
        dropDown.modeDependentFunction = null;
        switch (CommonAccessibles.ModeState)
        {
        case CommonAccessibles.Mode.BUILD:
            dropDown.modeDependentFunction += buildingPlacement.ModeManagerResponceHandler;


            break;

        case CommonAccessibles.Mode.PRODUCTION:
            dropDown.modeDependentFunction += produceUnits.ModeManagerResponceHandler;

            break;

        default:
        case CommonAccessibles.Mode.COMMAND:
            dropDown.modeDependentFunction += commandUnits.ModeManagerResponceHandler;
            break;
        }
    }
 public void ModeDisplayChange(CommonAccessibles.Mode mode)
 {
     text.text = "Mode: " + mode;
 }