// Update is called once per frame void Update() { if (!myDanceManager) { myDanceManager = FindObjectOfType <DanceManager>(); } else { int curr_score = myDanceManager.GetCurrentScore(); if (curr_score != score_was) { score_was = curr_score; transform.position = Vector3.Lerp(initialPosition, winningPosition, (((float)curr_score) / myDanceManager.winningScore)); } } }
private void Awake() { playerInput[0] = player.forward; playerInput[1] = player.backward; playerInput[2] = player.left; playerInput[3] = player.right; playerInput[4] = player.a; playerInput[5] = player.b; playerInput[6] = player.c; nodeType[0] = DancdNodeType.; nodeType[1] = DancdNodeType.; nodeType[2] = DancdNodeType.左; nodeType[3] = DancdNodeType.右; nodeType[4] = DancdNodeType.A; nodeType[5] = DancdNodeType.B; nodeType[6] = DancdNodeType.C; aud = GetComponent <AudioSource>(); dm = FindObjectOfType <DanceManager>(); }
void Awake() { m_DanceManager = FindObjectOfType <DanceManager>(); }
void Awake() { Instance = this; }
// Use this for initialization void Awake() { m_DanceManager = FindObjectOfType <DanceManager>(); //this.transform.position = StartingPoint.position; }
private void Awake() { dm = FindObjectOfType <DanceManager>(); }