Ejemplo n.º 1
0
 void Update()
 {
     if (hitTarget && hitObj.distance < brushDistance)
     {
         MenuSelect ms = hitObj.target.GetComponent <MenuSelect>();
         if (hitObj.target.GetComponent <Colorable>() != null)
         {
             DoColor(brushColor, hitObj);
         }
         else if (ms != null)
         {
             ms.Activate();
         }
     }
     else if (invHitTarget && invHitObj.distance < brushDistance + 0.145)
     {
         DoColor(baseColour, invHitObj);
     }
     else
     {
         // not coloring, stop sounds if any coloring sound is playing
         AudioSource audio = transform.GetComponent <AudioSource>();
         if (audio.isPlaying)
         {
             audio.Stop();
         }
     }
 }
 /// <summary>
 /// Initializes the MenuSelect and combo items, also sets the current DataContext to the current order
 /// </summary>
 /// <param name="m">MenuSelect item kept to access the borders of the screen</param>
 /// <param name="c">Combo currently being manipulated</param>
 /// <param name="o">Order combo is being added to</param>
 public SideComboControlComponent(MenuSelect m, Combo c, Order o)
 {
     InitializeComponent();
     DataContext = o;
     menu        = m;
     combo       = c;
 }
Ejemplo n.º 3
0
		static void Main(string[] args)
		{
			List<Employee> dataBase;

			dataBase = Load(configFileName);

			//dataBase.Add(new Employee("Угон", "Камазов", "Сторож"));
			//dataBase.Add(new Employee("Рулон", "Обоев", "Космонавт"));
			//dataBase.Add(new Employee("Бидон", "Помоев", "Ловец зелёных зайцев"));
			
			Console.WriteLine("Для продолжения нажмите любую клавишу");
			Console.ReadKey();
			Console.Write("\b");

			DBCommandMenu menu = new DBCommandMenu(dataBase, "db>");

			IMenu<List<Employee>> add = new MenuAdd(dataBase, "add");
			add.AddSubmenu(new MenuAddEployee(dataBase, "emp"));

			IMenu<List<Employee>> select = new MenuSelect(dataBase, "sel");
			select.AddSubmenu(new MenuSelectAll(dataBase, "all"));

			IMenu<List<Employee>> delete = new MenuDelete(dataBase, "del");
			delete.AddSubmenu(new MenuDeleteAll(dataBase, "all"));

			menu.AddSubmenu(add);
			menu.AddSubmenu(select);
			menu.AddSubmenu(delete);

			menu.Show();

			Save(dataBase);
		}
Ejemplo n.º 4
0
    // Start is called before the first frame update
    protected virtual void Start()
    {
        _nowTime      = 0;
        _nowTimeDelay = 0;

        _startUI = this;
        //_clip = transform.root.GetComponent<UIAudio>();
        _buttonList = new List <ButtonAction>();
        // 子のオブジェクト取得
        foreach (RectTransform child in transform)
        {
            // ボタンを取得する
            if (child.TryGetComponent(out ButtonAction buttonAction))
            {
                _buttonList.Add(buttonAction);
            }
        }
        if (_cursor)
        {
            foreach (RectTransform child in _cursor)
            {
                if (child.TryGetComponent(out Text text))
                {
                    _cursorText = text;
                }
            }
        }

        // 入力情報の初期化
        _axis = 0;
        _id   = 0;
    }
Ejemplo n.º 5
0
    // Use this for initialization
    void Start()
    {
        Instance = this;
        DontDestroyOnLoad(transform.gameObject);
        anim         = GetComponent <Animator>();
        CurrentLevel = 0;

        levelButtons = MenuStart.Instance.buttons;

        isUnlocked = new bool[levelButtons.Length];
        for (int i = 0; i < isUnlocked.Length; i++)
        {
            isUnlocked[i] = false;
        }

        isUnlocked[0] = true;

        selectedMenu = MenuSelect.Main;

        SetButtons();

        GameObject fadeObject = GameObject.Find("BlackFade");

        if (fadeObject != null)
        {
            //Debug.Log("its not null");
            blackFade = fadeObject.GetComponent <Image>();
        }
    }
 /// <summary>
 /// Constuctor to initialize Menu Select item, current drink item, current order, current combo
 /// </summary>
 /// <param name="menuItem">MenuSelect item to have access to the screens borders</param>
 /// <param name="ss">Drink item to be customized</param>
 /// <param name="o">Order to add the drink to</param>
 /// <param name="c">Combo to add the drink to</param>
 public CustomizeSailorSoda(MenuSelect menuItem, SailorSoda ss, Order o, Combo c)
 {
     InitializeComponent();
     ms           = menuItem;
     DataContext  = ss;
     currentItem  = ss;
     currentOrder = o;
     currentCombo = c;
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Constuctor to initialize Menu Select item, current entree item, current order, current combo
 /// </summary>
 /// <param name="menuItem">MenuSelect item to have access to the screens borders</param>
 /// <param name="dd">Entree item to be customized</param>
 /// <param name="o">Order to add the entree to</param>
 /// <param name="c">Combo to add the entree to</param>
 public CustomizeDoubleDraugr(MenuSelect menuItem, DoubleDraugr dd, Order o, Combo c)
 {
     InitializeComponent();
     ms           = menuItem;
     DataContext  = dd;
     currentItem  = dd;
     currentOrder = o;
     currentCombo = c;
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Constuctor to initialize Menu Select item, current drink item, current order, current combo
 /// </summary>
 /// <param name="menuItem">MenuSelect item to have access to the screens borders</param>
 /// <param name="mm">Drink item to be customized</param>
 /// <param name="o">Order to add the drink to</param>
 /// <param name="c">Combo to add the drink to</param>
 public CustomizeMarkarthMilk(MenuSelect menuItem, MarkarthMilk mm, Order o, Combo c)
 {
     InitializeComponent();
     ms           = menuItem;
     DataContext  = mm;
     currentItem  = mm;
     currentOrder = o;
     currentCombo = c;
 }
 /// <summary>
 /// Constuctor to initialize Menu Select item, current entree item, current order, current combo
 /// </summary>
 /// <param name="menuItem">MenuSelect item to have access to the screens borders</param>
 /// <param name="php">Entree item to be customized</param>
 /// <param name="o">Order to add the entree to</param>
 /// <param name="c">Combo to add the entree to</param>
 public CustomizePhillyPoacher(MenuSelect menuItem, PhillyPoacher php, Order o, Combo c)
 {
     InitializeComponent();
     ms           = menuItem;
     DataContext  = php;
     currentItem  = php;
     currentOrder = o;
     currentCombo = c;
 }
 /// <summary>
 /// Constuctor to initialize Menu Select item, current entree item, current order, current combo
 /// </summary>
 /// <param name="menuItem">MenuSelect item to have access to the screens borders</param>
 /// <param name="bb">Entree item to be customized</param>
 /// <param name="o">Order to add the entree to</param>
 /// <param name="c">Combo to add the entree to</param>
 public CustomizeBriarheartBurger(MenuSelect menuItem, BriarheartBurger bb, Order o, Combo c)
 {
     InitializeComponent();
     ms           = menuItem;
     DataContext  = bb;
     currentOrder = o;
     currentItem  = bb;
     currentCombo = c;
 }
Ejemplo n.º 11
0
 /// <summary>
 /// Constuctor to initialize Menu Select item, current side item, current order, current combo
 /// </summary>
 /// <param name="menuItem">MenuSelect item to have access to the screens borders</param>
 /// <param name="fm">Side item to be customized</param>
 /// <param name="o">Order to add the side to</param>
 /// <param name="c">Combo to add the side to</param>
 public CustomizeFriedMiraak(MenuSelect menuItem, FriedMiraak fm, Order o, Combo c)
 {
     InitializeComponent();
     ms           = menuItem;
     DataContext  = fm;
     currentItem  = fm;
     currentOrder = o;
     currentCombo = c;
 }
 /// <summary>
 /// Constuctor to initialize Menu Select item, current drink item, current order, current combo
 /// </summary>
 /// <param name="menuItem">MenuSelect item to have access to the screens borders</param>
 /// <param name="chc">Drink item to be customized</param>
 /// <param name="o">Order to add the drink to</param>
 /// <param name="c">Combo to add the drink to</param>
 public CustomizeCandlehearthCoffee(MenuSelect menuItem, CandlehearthCoffee chc, Order o, Combo c)
 {
     InitializeComponent();
     ms           = menuItem;
     DataContext  = chc;
     currentItem  = chc;
     currentOrder = o;
     currentCombo = c;
 }
Ejemplo n.º 13
0
 /// <summary>
 /// Constuctor to initialize Menu Select item, current drink item, current order, current combo
 /// </summary>
 /// <param name="menuItem">MenuSelect item to have access to the screens borders</param>
 /// <param name="aj">Drink item to be customized</param>
 /// <param name="o">Order to add the drink to</param>
 /// <param name="c">Combo to add the drink to</param>
 public CustomizeAretinoAppleJuice(MenuSelect menuItem, AretinoAppleJuice aj, Order o, Combo c)
 {
     InitializeComponent();
     ms           = menuItem;
     DataContext  = aj;
     currentItem  = aj;
     currentOrder = o;
     currentCombo = c;
 }
Ejemplo n.º 14
0
 /// <summary>
 /// Constuctor to initialize Menu Select item, current side item, current order, current combo
 /// </summary>
 /// <param name="menuItem">MenuSelect item to have access to the screens borders</param>
 /// <param name="mog">Side item to be customized</param>
 /// <param name="o">Order to add the side to</param>
 /// <param name="c">Combo to add the side to</param>
 public CustomizeMadOtarGrits(MenuSelect menuItem, MadOtarGrits mog, Order o, Combo c)
 {
     InitializeComponent();
     ms           = menuItem;
     DataContext  = mog;
     currentItem  = mog;
     currentOrder = o;
     currentCombo = c;
 }
Ejemplo n.º 15
0
 /// <summary>
 /// Constuctor to initialize Menu Select item, current side item, current order, current combo
 /// </summary>
 /// <param name="menuItem">MenuSelect item to have access to the screens borders</param>
 /// <param name="dwf">Side item to be customized</param>
 /// <param name="o">Order to add the side to</param>
 /// <param name="c">Combo to add the side to</param>
 public CustomizeDragonbornWaffleFries(MenuSelect menuItem, DragonbornWaffleFries dwf, Order o, Combo c)
 {
     InitializeComponent();
     ms           = menuItem;
     DataContext  = dwf;
     currentItem  = dwf;
     currentOrder = o;
     currentCombo = c;
 }
 /// <summary>
 /// Constuctor to initialize Menu Select item, current side item, current order, current combo
 /// </summary>
 /// <param name="menuItem">MenuSelect item to have access to the screens borders</param>
 /// <param name="vs">Side item to be customized</param>
 /// <param name="o">Order to add the side to</param>
 /// <param name="c">Combo to add the side to</param>
 public CustomizeVokunSalad(MenuSelect menuItem, VokunSalad vs, Order o, Combo c)
 {
     InitializeComponent();
     ms           = menuItem;
     DataContext  = vs;
     currentItem  = vs;
     currentOrder = o;
     currentCombo = c;
 }
 /// <summary>
 /// Constuctor to initialize Menu Select item, current entree item, current order, current combo
 /// </summary>
 /// <param name="menuItem">MenuSelect item to have access to the screens borders</param>
 /// <param name="sks">Entree item to be customized</param>
 /// <param name="o">Order to add the entree to</param>
 /// <param name="c">Combo to add the entree to</param>
 public CustomizeSmokehouseSkeleton(MenuSelect menuItem, SmokehouseSkeleton sks, Order o, Combo c)
 {
     InitializeComponent();
     ms           = menuItem;
     DataContext  = sks;
     currentItem  = sks;
     currentOrder = o;
     currentCombo = c;
 }
 /// <summary>
 /// Constuctor to initialize Menu Select item, current drink item, current order, current combo
 /// </summary>
 /// <param name="menuItem">MenuSelect item to have access to the screens borders</param>
 /// <param name="ww">Drink item to be customized</param>
 /// <param name="o">Order to add the drink to</param>
 /// <param name="c">Combo to add the drink to</param>
 public CustomizeWarriorWater(MenuSelect menuItem, WarriorWater ww, Order o, Combo c)
 {
     InitializeComponent();
     ms           = menuItem;
     DataContext  = ww;
     currentItem  = ww;
     currentOrder = o;
     currentCombo = c;
 }
 /// <summary>
 /// Constuctor to initialize Menu Select item, current entree item, current order, current combo
 /// </summary>
 /// <param name="menuItem">MenuSelect item to have access to the screens borders</param>
 /// <param name="tt">Entree item to be customized</param>
 /// <param name="o">Order to add the entree to</param>
 /// <param name="c">Combo to add the entree to</param>
 public CustomizeThalmorTriple(MenuSelect menuItem, ThalmorTriple tt, Order o, Combo c)
 {
     InitializeComponent();
     ms           = menuItem;
     DataContext  = tt;
     currentItem  = tt;
     currentOrder = o;
     currentCombo = c;
 }
 /// <summary>
 /// Constuctor to initialize Menu Select item, current entree item, current order, current combo
 /// </summary>
 /// <param name="menuItem">MenuSelect item to have access to the screens borders</param>
 /// <param name="goo">Entree item to be customized</param>
 /// <param name="o">Order to add the entree to</param>
 /// <param name="c">Combo to add the entree to</param>
 public CustomizeGardenOrcOmelette(MenuSelect menuItem, GardenOrcOmelette goo, Order o, Combo c)
 {
     InitializeComponent();
     ms           = menuItem;
     DataContext  = goo;
     currentItem  = goo;
     currentOrder = o;
     currentCombo = c;
 }
 /// <summary>
 /// Constuctor to initialize Menu Select item, current entree item, current order, current combo
 /// </summary>
 /// <param name="menuItem">MenuSelect item to have access to the screens borders</param>
 /// <param name="ttb">Entree item to be customized</param>
 /// <param name="o">Order to add the entree to</param>
 /// <param name="c">Combo to add the entree to</param>
 public CustomizeThugsTBone(MenuSelect menuItem, ThugsTBone ttb, Order o, Combo c)
 {
     InitializeComponent();
     ms           = menuItem;
     DataContext  = ttb;
     currentItem  = ttb;
     currentOrder = o;
     currentCombo = c;
 }
 /// <summary>
 /// Initializes menu, currentOrder, and receipt and sets data context.
 /// </summary>
 /// <param name="m">Current MenuSelect</param>
 /// <param name="order">Current Order</param>
 /// <param name="temp">Current CurrentOrderControlComponent(receipt)</param>
 public CashRegister(MenuSelect m, Order order, CurrentOrderControlComponent temp)
 {
     InitializeComponent();
     DataContext         = order;
     TotalTextBlock.Text = String.Format("{0:0.00}", order.Total);
     menu         = m;
     DataContext  = new CashRegisterViewModel(order, this);
     currentOrder = order;
     receipt      = temp;
 }
Ejemplo n.º 23
0
    void Start()
    {
        selectInst = (MenuSelect)gameObject.GetComponent <MenuSelect>();
        SFX        = gameObject.GetComponent <AudioSource>();
        continueButton.transform.GetChild(0).GetComponent <Button>().onClick.AddListener(ResumeGame);
        restartButton.transform.GetChild(0).GetComponent <Button>().onClick.AddListener(RestartLoad);
        returnButton.transform.GetChild(0).GetComponent <Button>().onClick.AddListener(ReturnLoad);

        ResetPositions();
    }
Ejemplo n.º 24
0
    void Init()
    {
        s_Manager = GameObject.Find("Managers").GetComponent <TopManager>();

        t_Title    = GameObject.Find("Managers").transform.FindChild("Main").transform.FindChild("Title").transform;
        t_Tutorial = GameObject.Find("Managers").transform.FindChild("Main").transform.FindChild("Tutorial").transform;
        t_Develop  = GameObject.Find("Managers").transform.FindChild("Main").transform.FindChild("Develop").transform;

        s_Start    = GameObject.Find("Managers").transform.FindChild("Main").transform.FindChild("Title").transform.FindChild("Main_Start").GetComponent <MenuSelect>();
        s_Develop  = GameObject.Find("Managers").transform.FindChild("Main").transform.FindChild("Title").transform.FindChild("Main_Develop").GetComponent <MenuSelect>();
        s_Tutorial = GameObject.Find("Managers").transform.FindChild("Main").transform.FindChild("Title").transform.FindChild("Main_Tutorial").GetComponent <MenuSelect>();

        if (s_Manager.curState == TopManager.ManagerActiveState.MAIN)
        {
            curState = MainState.Title;
        }
    }
Ejemplo n.º 25
0
        /// <summary>
        /// Responds to user input, changing the selected entry and accepting
        /// or cancelling the menu.
        /// </summary>
        public override void HandleInput(GameTime gameTime, InputState input)
        {
            // For input tests we pass in our ControllingPlayer, which may
            // either be null (to accept input from any player) or a specific index.
            // If we pass a null controlling player, the InputState helper returns to
            // us which player actually provided the input. We pass that through to
            // OnSelectEntry and OnCancel, so they can tell which player triggered them.
            PlayerIndex playerIndex;

            // Move to the previous menu entry?
            if (MenuUp.Evaluate(input, ControllingPlayer, out playerIndex))
            {
                SelectedEntry--;

                if (SelectedEntry < 0)
                {
                    SelectedEntry = MenuEntries.Count - 1;
                }
            }

            // Move to the next menu entry?
            if (MenuDown.Evaluate(input, ControllingPlayer, out playerIndex))
            {
                SelectedEntry++;

                if (SelectedEntry >= MenuEntries.Count)
                {
                    SelectedEntry = 0;
                }
            }

            if (MenuSelect.Evaluate(input, ControllingPlayer, out playerIndex))
            {
                OnSelectEntry(SelectedEntry, playerIndex);
            }
            else if (MenuCancel.Evaluate(input, ControllingPlayer, out playerIndex))
            {
                OnCancel(playerIndex);
            }
        }
Ejemplo n.º 26
0
        /// <summary>
        /// 테이블 선택 시 메뉴 선택 창으로 이동
        /// </summary>
        /// <param name="tblNum">테이블 번호</param>
        private void TableSelect(int tblNum)
        {
            bool flagInUse = false;

            switch (tblNum)
            {
            case 1:
                flagInUse = btnTable1.Background == Brushes.Gray;
                break;

            case 2:
                flagInUse = btnTable2.Background == Brushes.Gray;
                break;

            case 3:
                flagInUse = btnTable3.Background == Brushes.Gray;
                break;

            case 4:
                flagInUse = btnTable4.Background == Brushes.Gray;
                break;
            }
            if (NavigationService.CanGoForward)
            {
                NavigationService.GoForward();
            }
            else
            {
                if (flagInUse)
                {
                    DialogResult dialogResult = MessageBox.Show("추가 주문 하시겠습니까?", "주문", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                    if (dialogResult == DialogResult.No)
                    {
                        return;
                    }
                }
                MenuSelect menuSelect = new MenuSelect(tblNum, OrderCheck(tblNum));
                NavigationService.Navigate(menuSelect);
            }
        }
Ejemplo n.º 27
0
    // Update is called once per frame
    void Update()
    {
        if (isActive)
        {
            float XInput = Input.GetAxis("L_XAxis_1");
            float YInput = Input.GetAxis("L_YAxis_1");

            if (MenuState == MenuSelect.PLAY)
            {
                if (YInput > 0 && timeDelay > .2f)
                {
                    SelectMulti();
                    timeDelay = 0f;
                    MenuState = MenuSelect.MULTI;
                    //AudioManager.instance.Stop("MenuPing");
                    //AudioManager.instance.Play("MenuPing");
                }
            }
            else if (MenuState == MenuSelect.MULTI)
            {
                if (XInput > 0 && timeDelay > .2f)
                {
                    SelectOptions();
                    timeDelay = 0f;
                    MenuState = MenuSelect.OPTIONS;
                    //AudioManager.instance.Stop("MenuPing");
                    //AudioManager.instance.Play("MenuPing");
                }
                else if (YInput < 0 && timeDelay > .2f)
                {
                    SelectPlay();
                    timeDelay = 0f;
                    MenuState = MenuSelect.PLAY;
                    //AudioManager.instance.Stop("MenuPing");
                    //AudioManager.instance.Play("MenuPing");
                }
            }
            else if (MenuState == MenuSelect.OPTIONS)
            {
                if (XInput > 0 && timeDelay > .2f)
                {
                    SelectExit();
                    timeDelay = 0f;
                    MenuState = MenuSelect.EXIT;
                    //AudioManager.instance.Stop("MenuPing");
                    //AudioManager.instance.Play("MenuPing");
                }
                else if (XInput < 0 && timeDelay > .2f)
                {
                    SelectMulti();
                    timeDelay = 0f;
                    MenuState = MenuSelect.MULTI;
                    //AudioManager.instance.Stop("MenuPing");
                    //AudioManager.instance.Play("MenuPing");
                }
            }
            else if (MenuState == MenuSelect.EXIT)
            {
                if (XInput < 0 && timeDelay > .2f)
                {
                    SelectOptions();
                    timeDelay = 0f;
                    MenuState = MenuSelect.OPTIONS;
                    //AudioManager.instance.Stop("MenuPing");
                    //AudioManager.instance.Play("MenuPing");
                }
            }



            //Select Menu Option: Run corresponding program
            if (Input.GetButtonDown("A_1") || Input.GetButtonDown("Submit"))
            {
                if (MenuState == MenuSelect.PLAY)
                {
                    FindObjectOfType <Launcher>().Connect();
                }
                if (MenuState == MenuSelect.OPTIONS)
                {
                    FindObjectOfType <MainCameraScript>().ClearFlags();
                    FindObjectOfType <MainCameraScript>().movetoOptions = true;
                    FindObjectOfType <MainCameraScript>().timeDelay     = 0f;
                    isActive = false;
                    FindObjectOfType <OptionsMenu>().isActive = true;
                }
                if (MenuState == MenuSelect.EXIT)
                {
                    Exit();
                }
            }

            timeDelay += Time.deltaTime;
        }
    }
 void Awake()
 {
     menuSelect = menuSelect.GetComponent <MenuSelect>();
 }
Ejemplo n.º 29
0
 // Use this for initialization
 void Start()
 {
     menu = GameObject.Find("Player").GetComponent<MenuSelect>();
     myChild = transform.GetChild(0).gameObject;
     usingCardboard = Cardboard.SDK;
 }