public void Init(string s) { animation = GetComponent<VillagerAnimation>(); animation.Init (s); skinMaterial = GetComponentInChildren<MeshRenderer>().material; origColor = skinMaterial.color; // music stuff musicToggle = GetComponent<ToggleSuspend>(); musicPattern = GetComponent<Pattern>(); SetMusicPattern(); musicSample = GetComponent<Sampler>(); SetMusicSample(); keyboardPosition = transform.localPosition; textMesh = GetComponentInChildren<TextMesh>(); letter = s; textMesh.text = s; currentState = State.Idle; timeSinceLastDanced = Time.time; }
private void Start() { anim = GetComponent<VillagerAnimation>(); }