示例#1
0
 public SkinsVM(Screen screen)
 {
     if (screen.Type != Screen.ScreenType.Skins)
     {
         throw new ArgumentException();
     }
     _firstOn        = true;
     Screen          = screen;
     _mv             = ModelViewer.GetInstance();
     Screen.TurnedOn = TurnOnHandler;
     Screen.Rect.transform.Find("Back").GetComponent <Button>().onClick.AddListener(HandleBackButton);
 }
示例#2
0
    public ShowroomVM(Screen screen)
    {
        if (screen.Type != Screen.ScreenType.Showroom)
        {
            throw new ArgumentException();
        }
        Screen = screen;
        screen.Rect.transform.Find("Back").GetComponent <Button>().onClick.AddListener(HandleBackButton);
        screen.Rect.transform.Find("Left").GetComponent <ClickHandler>().Clicked  = () => Next(true);
        screen.Rect.transform.Find("Right").GetComponent <ClickHandler>().Clicked = () => Next(false);
        _use = screen.Rect.transform.Find("Use").GetComponent <Button>();
        _use.onClick.AddListener(Use);
        _useText = screen.Rect.transform.Find("Use").GetComponentInChildren <Text>();

        screen.TurnedOn = TurnOnHandler;
        _skins          = SkinsContainer.GetInstance().Skins;
        _mv             = ModelViewer.GetInstance();
        _progress       = ProgressData.GetInstance();
    }