예제 #1
0
 // Start is called before the first frame update
 void Start()
 {
     rigidbody       = GetComponent <Rigidbody2D>();
     trackDataHolder = GameObject.FindWithTag("TrackData").GetComponent <TrackDataHolder>();
     gripTilemap     = GameObject.FindWithTag("TilemapGrip").GetComponent <Tilemap>();
     StartCoroutine(LeftOrRightChanger());
     StartCoroutine(RandomCornering());
     engineSoundOffset += Random.Range(-0.05f, 0.05f);
 }
예제 #2
0
 private void OnEnable()
 {
     trackDataHolder = (TrackDataHolder)target;
     wayPoints       = trackDataHolder.trackData.wayPoints;
     if (wayPoints == null)
     {
         wayPoints = new List <WayPoint>();
     }
 }
예제 #3
0
    // Start is called before the first frame update
    void Start()
    {
        trackDataHolder = GameObject.FindWithTag("TrackData").GetComponent <TrackDataHolder>();

        GI = GameObject.FindWithTag("UI_GI").GetComponent <UnityEngine.UI.Slider>();
        BI = GameObject.FindWithTag("UI_BI").GetComponent <UnityEngine.UI.Slider>();

        currentGear = 0;

        gripTilemap = GameObject.FindWithTag("TilemapGrip").GetComponent <Tilemap>();
        camera      = GameObject.FindWithTag("VC").GetComponent <CinemachineVirtualCamera>();
    }