示例#1
0
    void Start()
    {
        messagecontrols = FindObjectOfType <MessageController>();
        rigidBody       = GetComponent <Rigidbody2D>();
        playerAnimation = GetComponent <Animator>();
        afterflightCC   = FindObjectOfType <AfterFlightCollisionController>();
        navscripts      = FindObjectOfType <NavScripts>();
        audiomanager    = AudioManager.instance;
        scorecount      = FindObjectOfType <ScoreCounter>();
        respawnpoint    = FindObjectOfType <RespawnPointControls>();
        loadscene       = FindObjectOfType <LoadScene>();
        scorecounter    = FindObjectOfType <ScoreCounter>();
        helpcontrol     = FindObjectOfType <HelpController>();
        if (isReloaded)
        {
            //Debug.Log(shouldShowHelp);
            //Debug.Log(respawnpoint.GetRespawnPoint());
            this.transform.position = respawnpoint.GetRespawnPoint();

            //if (shouldShowHelp)
            //{
            /// StartCoroutine(MessageShow());
            // shouldShowHelp = false;
            //}
            isReloaded = false;
        }
        levelNav = FindObjectOfType <LevelNavControl>();
    }
示例#2
0
    void Start()
    {
        languagecontrol = FindObjectOfType <LanguageController>();
        data            = languagecontrol.DataFile();
        navigation      = FindObjectOfType <NavScripts>();
        textshowhide    = FindObjectOfType <TextShowHide>();

        //GameObject clickTextObject = GameObject.Find("ClickWeightText");
        //Text ClickWeightText = GameObject.Find("ClickWeightText")?.GetComponent<Text>();
        Text homeText   = GameObject.Find("homeText")?.GetComponent <Text>();
        Text replayText = GameObject.Find("replayText")?.GetComponent <Text>();
        Text helpText   = GameObject.Find("helpText")?.GetComponent <Text>();

        //Debug.Log(helpText);
        // Debug.Log("childCount: "+GameObject.Find("NavButtons")?.GetComponent<Transform>().childCount);

        //componentsArray = new Text[] {ClickWeightText, homeText, replayText };
        componentsArray = new Text[] { homeText, replayText, helpText };

        string[] objNames = { "homeText", "replayText", "helpText" };

        objectNames = new List <string>(objNames);

        homeText.text   = data.SelectNodes("/strings/" + "string[@id='homeText']")[0].InnerText.ToString();
        replayText.text = data.SelectNodes("/strings/" + "string[@id='replayText']")[0].InnerText.ToString();

        // textshowhide.hideText(clickTextObject);
        navigation.ShowHideNav(false);
    }
示例#3
0
 void Start()
 {
     rigidBody       = GetComponent <Rigidbody2D>();
     playerAnimation = GetComponent <Animator>();
     afterflightCC   = FindObjectOfType <AfterFlightCollisionController>();
     navscripts      = FindObjectOfType <NavScripts>();
 }
    void Start()
    {
        languagecontrol = FindObjectOfType <LanguageController>();
        navigation      = FindObjectOfType <NavScripts>();
        textshowhide    = FindObjectOfType <TextShowHide>();

        GameObject clickTextObject = GameObject.Find("ClickWeightText");
        Text       ClickWeightText = GameObject.Find("ClickWeightText")?.GetComponent <Text>();
        Text       homeText        = GameObject.Find("homeText")?.GetComponent <Text>();
        Text       replayText      = GameObject.Find("replayText")?.GetComponent <Text>();

        // Debug.Log("childCount: "+GameObject.Find("NavButtons")?.GetComponent<Transform>().childCount);

        componentsArray = new Text[] { ClickWeightText, homeText, replayText };

        string[] objNames = { "ClickWeightText", "homeText", "replayText" };

        objectNames = new List <string>(objNames);

        textshowhide.hideText(clickTextObject);
        navigation.ShowHideNav(false);
    }