void Start() { sequencer = GetComponent<Sequencer>(); sequencer.tempo = tempo; sequencer.OnNextBar += OnNextBar; cameraController = GetComponent<CameraController>(); monster = GameObject.Instantiate(monsterPrefab).GetComponent<MonsterController>(); monster.speechGui = monsterSpeechGui; monster.SetLeftEnd(cameraController.ScreenLeft); monster.speakSpeed = 8.0f / tempo; line = GameObject.Instantiate(groundPrefab).GetComponent<LineController>(); line.SetStartPoint(monster.GetRightEnd()); line.SetLength(0.5f * cameraController.ScreenSize - monster.GetRightEnd()); }