<commit_before>﻿using BumperCars.CustomFlatRide.BumperCars;
using UnityEngine;

namespace BumperCars.CustomFlatRide.FlatRideScript
{
    public class BumperCars : FlatRide
    {
        public new enum State
        {
            Stopped,
            Running
        }
    
        [Serialized]
        public State CurrentState;

        [Serialized]
        private float _time;

        public AudioClip Tune;

        void Start()
        {
            guestsCanRaiseArms = false;

            CurrentState = State.Stopped;

            Transform cars = transform.Find("Cars");

            foreach (Transform car in cars)
            {
                car.gameObject.AddComponent<BumperCar>();
            }

            AudioSource audio = gameObject.AddComponent<AudioSource>();

            audio.clip = Tune;
            audio.playOnAwake = true;
            audio.loop = true;
            audio.spatialBlend = 1;
            audio.rolloffMode = AudioRolloffMode.Linear;
            audio.maxDistance = 75;
            audio.volume = 0.1f;

            base.Start();
        }

        public override void onStartRide()
        {
            base.onStartRide();

            CurrentState = State.Running;
        }

        public override void tick(StationController stationController)
        {
            if (CurrentState == State.Running)
            {
                _time += Time.deltaTime;

                if (_time > 25)
                {
                    CurrentState = State.Stopped;
                    _time = 0;
                }
            }
        }
    
        public override bool shouldLetGuestsOut()
        {
            return CurrentState == State.Stopped;
        }
    }<commit_msg>Make time public<commit_after>﻿using BumperCars.CustomFlatRide.BumperCars;
using UnityEngine;

namespace BumperCars.CustomFlatRide.FlatRideScript
{
    public class BumperCars : FlatRide
    {
        public new enum State
        {
            Stopped,
            Running
        }
    
        [Serialized]
        public State CurrentState;

        [Serialized]
        public float Time;

        public AudioClip Tune;

        void Start()
        {
            guestsCanRaiseArms = false;

            CurrentState = State.Stopped;

            Transform cars = transform.Find("Cars");

            foreach (Transform car in cars)
            {
                car.gameObject.AddComponent<BumperCar>();
            }

            AudioSource audio = gameObject.AddComponent<AudioSource>();

            audio.clip = Tune;
            audio.playOnAwake = true;
            audio.loop = true;
            audio.spatialBlend = 1;
            audio.rolloffMode = AudioRolloffMode.Linear;
            audio.maxDistance = 75;
            audio.volume = 0.1f;

            base.Start();
        }

        public override void onStartRide()
        {
            base.onStartRide();

            CurrentState = State.Running;
        }

        public override void tick(StationController stationController)
        {
            if (CurrentState == State.Running)
            {
                Time += UnityEngine.Time.deltaTime;

                if (Time > 25)
                {
                    CurrentState = State.Stopped;
                    Time = 0;
                }
            }
        }
    
        public override bool shouldLetGuestsOut()
        {
            return CurrentState == State.Stopped;
        }
    }
{'fraction_non_alphanumeric': 0.07485549132947977, 'fraction_numerical': 0.004624277456647399, 'mean_word_length': 1.3165997322623828, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6191013', 'n_tokens_mistral': 932, 'n_tokens_neox': 871, 'n_words': 184}