Beispiel #1
0
 public void StartWalking(Transform[] newnodes, callbacktype callback)
 {
     i            = 0;
     nodes        = newnodes;
     selectedNode = nodes[i];
     walking      = true;
     callwhendone = callback;
 }
    public void Display(string text, Color color, float plusDuration, AudioClip clip, callbacktype callback)
    {
        Transform displayclone = Instantiate(localdisplay, transform.position + offset, transform.rotation, this.transform);

        tmp       = displayclone.GetComponentInChildren <TextMeshProUGUI>();
        tmp.color = color;
        tmp.text  = text;
        aud.clip  = clip;
        aud.Play();
        doneat = Time.time + clip.length + plusDuration;
        Destroy(displayclone.gameObject, clip.length + plusDuration);
        currentcallback = callback;
        Invoke("Callback", clip.length + plusDuration);
    }