コード例 #1
0
ファイル: BeardView.cs プロジェクト: keltonxian/salon
    private void SetupTool()
    {
        _markSeatPos = _seat.anchoredPosition;
        _model.Init();
        _pageView.Init();
        _scissors.Init(_model);
        _grower.Init(_model);
        _markGrowerPos = _grower.GetComponent <RectTransform>().anchoredPosition;
        _bubble.Init(_model);
        _markBubblePos = _bubble.GetComponent <RectTransform>().anchoredPosition;
        _shaverRound.Init(_model);
        _shaverSharp.Init(_model);
        _scraper.Init(_model);
        _razor.Init(_model);
        _forceps.Init(_model);
        _bandage.Init(_model);
        _unguent.Init(_model);
        _cream.Init(_model);
        _dyeRed.Init(_model);
        _dyeGreen.Init(_model);
        _dyeBlue.Init(_model);
        _dyePurple.Init(_model);
        SetCheckToolDrag(true);
        //Facade.Instance.SendMessageCommand(NotiConst.BEARD_END, "");

        _faceRed.Init(_model);
        _faceScar.Init(_model);

        _model.StartEmotion();

        //int debugIndex = 3;
        //StartCoroutine(GoDebug(debugIndex));
    }
コード例 #2
0
ファイル: LoadingView.cs プロジェクト: keltonxian/salon
    private void InitModel(Action callback)
    {
        string url = string.Format("{0}/{1}_loading_{2}.unity3d", AppConst.AppName, AppConst.AppName, GameManager.Role.ToString()).ToLower();

        AssetBundleManager.LoadAsset(url, (AssetBundleManager.Asset asset) => {
            GameObject prefab     = asset._assetBundle.LoadAsset <GameObject>(GameManager.Role.ToString());
            Transform model       = Instantiate(prefab).transform;
            model.gameObject.name = prefab.name;
            Vector3 pos           = model.localPosition;
            Vector3 scale         = model.localScale;
            model.SetParent(_mask);
            model.localPosition       = pos;
            model.localScale          = scale;
            BeardModelHandler handler = model.GetComponent <BeardModelHandler>();
            handler.Init();
            handler.StartEmotion();
            callback.Invoke();
        }, (AssetBundleManager.Asset asset) => {
        });
    }
コード例 #3
0
ファイル: HomeView.cs プロジェクト: keltonxian/salon
    void Awake()
    {
        _markModelLeftPos               = _modelLeftRT.anchoredPosition;
        _modelLeftRT.anchoredPosition   = new Vector2(-800f, _markModelLeftPos.y);
        _markModelRightPos              = _modelRightRT.anchoredPosition;
        _modelRightRT.anchoredPosition  = new Vector2(800f, _markModelRightPos.y);
        _markModelBottomPos             = _modelBottomRT.anchoredPosition;
        _modelBottomRT.anchoredPosition = new Vector2(_markModelBottomPos.x, -1000f);
        _modelLeft.Init();
        _modelRight.Init();
        _modelBottom.Init();

        _markTitlePos             = _titleRT.anchoredPosition;
        _titleRT.anchoredPosition = new Vector2(_markTitlePos.x, 1000f);
        _markTitleScale           = _titleRT.localScale.x;

        _markNameLeftScale     = _nameLeft.localScale.x;
        _nameLeft.localScale   = Vector3.zero;
        _markNameRightScale    = _nameRight.localScale.x;
        _nameRight.localScale  = Vector3.zero;
        _markNameBottomScale   = _nameBottom.localScale.x;
        _nameBottom.localScale = Vector3.zero;
    }