예제 #1
0
        private void HandleTargetRoomSelected(SelectRoom room)
        {
            // For data recording.
            float completionTime = Time.realtimeSinceStartup;

            // We have to subtract the animationDuration once since the start time is taken BEFORE the animation started (see StartSubtask()).
            RecordData.CurrentRecord.megamapTime = completionTime - startTime - map.animationDuration;

            var rooms = map.GetComponentsInChildren <SelectRoom>(true);

            for (int i = 0; i < rooms.Length; ++i)
            {
                RecordData.CurrentRecord.numBallsPerRoom[i] = rooms[i].Balls.Count;
            }

            RecordData.CurrentRecord.correctRoomIndex = Array.IndexOf(rooms, room);
            RecordData.CurrentRecord.correctRoomName  = room.name;

            map.Hide();

            completed = true;
        }
예제 #2
0
        private void HandleWrongRoomSelected(SelectRoom room)
        {
            FindObjectOfType <TaskDisplay>().CurrentDescriptionID = "megamapError";

            ++RecordData.CurrentRecord.numErrors;
        }