コード例 #1
0
    void Start()
    {
        audioSrc = GetComponent <AudioSource>();
        float volume = PlayerPrefsManager.GetSFX();

        audioSrc.volume   = volume;
        gameSession       = FindObjectOfType <GameSession>();
        ballInstantiation = FindObjectOfType <BallInstantiation>().GetComponent <BallInstantiation>();
        dialog            = FindObjectOfType <Dialog>();
        if (!dialog)
        {
            dialogV2 = FindObjectOfType <VoiceDialog>();
            Debug.Log("cant find dialog using dialog v2");
        }
        anim           = GetComponent <Animator>();
        Dots           = GameObject.Find("dots");
        rb.isKinematic = (true);
        coll.enabled   = false;
        startPosition  = transform.position;
        Path           = Dots.transform.Cast <Transform> ().ToList().ConvertAll(t => t.gameObject);//Convert children in game
        for (int i = 0; i < Path.Count; i++)
        {
            Path [i].GetComponent <Renderer> ().enabled = false;
        }
    }
コード例 #2
0
    /// </summary>


    private void Start()
    {
        levelManager      = GameObject.FindObjectOfType <LevelManager>();
        ballInstantiation = FindObjectOfType <BallInstantiation>().GetComponent <BallInstantiation>();
        colorTMPro        = false;
        StartCoroutine(Type());

        ballInstantiation.ins();
    }