Exemplo n.º 1
0
    // Start is called before the first frame update
    void Start()
    {
        Saw.gameObject.transform.GetChild(0).GetComponent <Animator>().enabled = false;
        zoomedIn  = false;
        isZooming = false;
        SetBodyAnimations(false);
        SetBackAnimations(false);
        SetLegAnimations(false);
        GoBackButton.SetActive(false);

        BodyPart.enabled       = false;
        BodyPartSecond.enabled = false;

        TrueNumber = 0;
    }
Exemplo n.º 2
0
    // 如果是chap 1 开屏在地铁内显示图片instruction 关闭时用这个
    public void CloseInstruction()
    {
        //if (Practicing) return;
        ////StationDetail.SetActive(false);
        ////GoBackButton.SetActive(true);

        if (stageTransiting && stage == 1)
        {
            ShowHint();
            MapHint.gameObject.transform.parent        = GoBackButton.transform;
            MapHint.gameObject.transform.localPosition = new Vector3(20f, 0, 0);
            GoBackButton.SetActive(true);
            isInstruction = false;
        }
    }
Exemplo n.º 3
0
    public IEnumerator EnterMap_Tut_S3()
    {
        isInstruction = true;
        Animator myAnim = MapInSubway.GetComponent <Animator>();

        myAnim.SetTrigger("idle");


        //car animation
        MapHint.gameObject.transform.parent        = waypoint1.transform;
        MapHint.gameObject.transform.localPosition = new Vector3(40f, -30f, 0);

        ShowHint();


        GoBackButton.SetActive(true);
        GoBackButton.GetComponent <Button>().enabled = false;
        yield return(null);
    }
Exemplo n.º 4
0
    //---------------------------------------------------------------------------------------------

    public void ConfigureUI(bool showGoBack)
    {
        StateManager stateManager = stateManagerGO.GetComponent <StateManager>();

        Player1UI.SetActive(true);
        Text player1Name = Player1UI.transform.Find("PlayerName").GetComponent <Text>();

        player1Name.color = stateManager.Players[0].PlayerColor;
        player1Name.text  = stateManager.Players[0].PlayerName;
        Player1UI.transform.Find("PlayerMoney").GetComponent <Text>().text = string.Format(LangManager.GetTranslation("currency_abreviation"), stateManager.Players[0].Money);
        Player1UI.transform.Find("PlayerPGS").GetComponent <Text>().text   = string.Format(LangManager.GetTranslation("points_abreviation"), stateManager.Players[0].PGS);

        Player2UI.SetActive(true);
        Text player2Name = Player2UI.transform.Find("PlayerName").GetComponent <Text>();

        player2Name.color = stateManager.Players[1].PlayerColor;
        player2Name.text  = stateManager.Players[1].PlayerName;
        Player2UI.transform.Find("PlayerMoney").GetComponent <Text>().text = string.Format(LangManager.GetTranslation("currency_abreviation"), stateManager.Players[1].Money);
        Player2UI.transform.Find("PlayerPGS").GetComponent <Text>().text   = string.Format(LangManager.GetTranslation("points_abreviation"), stateManager.Players[1].PGS);

        if (StateManager.NumberOfPlayers > 2)
        {
            Player3UI.SetActive(true);
            Text player3Name = Player3UI.transform.Find("PlayerName").GetComponent <Text>();
            player3Name.color = stateManager.Players[2].PlayerColor;
            player3Name.text  = stateManager.Players[2].PlayerName;
            Player3UI.transform.Find("PlayerMoney").GetComponent <Text>().text = string.Format(LangManager.GetTranslation("currency_abreviation"), stateManager.Players[2].Money);
            Player3UI.transform.Find("PlayerPGS").GetComponent <Text>().text   = string.Format(LangManager.GetTranslation("points_abreviation"), stateManager.Players[2].PGS);

            if (StateManager.NumberOfPlayers > 3)
            {
                Player4UI.SetActive(true);
                Text player4Name = Player4UI.transform.Find("PlayerName").GetComponent <Text>();
                player4Name.color = stateManager.Players[3].PlayerColor;
                player4Name.text  = stateManager.Players[3].PlayerName;
                Player4UI.transform.Find("PlayerMoney").GetComponent <Text>().text = string.Format(LangManager.GetTranslation("currency_abreviation"), stateManager.Players[3].Money);
                Player4UI.transform.Find("PlayerPGS").GetComponent <Text>().text   = string.Format(LangManager.GetTranslation("points_abreviation"), stateManager.Players[3].PGS);
            }
        }

        GoBackButton.SetActive(showGoBack);
    }
Exemplo n.º 5
0
    private void SetAllButtons(bool active)
    {
        GoBackButton.SetActive(!active);

        if (!firstCutted)
        {
            FirstButton.SetActive(active);
            FirstZoomButton.SetActive(active);
        }
        if (!secondCutted)
        {
            SecondButton.SetActive(active);
            SecondZoomButton.SetActive(active);
        }
        if (!thirdCutted)
        {
            ThirdButton.SetActive(active);
            ThirdZoomButton.SetActive(active);
        }
    }
Exemplo n.º 6
0
    public IEnumerator EnterMap_Tut_S2()
    {
        isInstruction = true;
        Animator myAnim = MapInSubway.GetComponent <Animator>();

        myAnim.SetTrigger("idle");

        FinalCameraController.enableScroll = true;


        GoBackButton.SetActive(false);
        Hide(MapCar.GetComponent <CanvasGroup>());
        MapCar_Tut_S2.SetActive(true);
        MapTutorialBubble.SetActive(true);

        yield return(new WaitForSeconds(2f));

        ShowHint();
        MapTutorialBubble.SetActive(false);
    }
 private void SetButtons(bool active)
 {
     BodyZoomButton.SetActive(active);
     LegZoomButton.SetActive(active);
     GoBackButton.SetActive(!active);
 }