コード例 #1
0
ファイル: UIController.cs プロジェクト: Zankey/2TownsAR
    public void FoundObject(ARObjectType objectType, AboutViewState aboutViewState = AboutViewState.Peeking)
    {
        switch (objectType)
        {
        case ARObjectType.Cross:
            CrossFound = true;
            aboutViewController.SetTitleText("(Insert Cross Title Here)");
            aboutViewController.SetBodyText("(Replace this text with cross body text.)");
            break;

        case ARObjectType.Diamond:
            DiamondFound = true;
            aboutViewController.SetTitleText("(Insert Diamond Title Here)");
            aboutViewController.SetBodyText("(Replace this text with diamond body text.)");
            break;

        case ARObjectType.Mountain:
            MountainFound = true;
            aboutViewController.SetTitleText("(Insert Mountain Title Here)");
            aboutViewController.SetBodyText("(Replace this text with mountain body text.)");
            break;

        case ARObjectType.City:
            CityFound = true;
            aboutViewController.SetTitleText("(Insert City Title Here)");
            aboutViewController.SetBodyText("(Replace this text with city body text.)");
            break;
        }

        aboutViewController.SetState(aboutViewState);
        progressViewController.FoundObject(objectType);
    }
コード例 #2
0
    public void SetState(AboutViewState state)
    {
        this.state = state;
        switch (state)
        {
        case AboutViewState.Hidden:
            this.targetYPosition = -300;
            break;

        case AboutViewState.Peeking:
            this.targetYPosition = -220;
            hideWhenPossible     = false;
            break;

        case AboutViewState.Shown:
            this.targetYPosition = 0;
            break;
        }
    }