/// <summary> /// Retrieve the first checkpoint for checkpint time calculations /// </summary> private void GetFirstCheckPoint() { Transform[] CheckPointItems = GetChildTransforms(CheckPoints.transform); CheckPointItem FirstCheckPoint = CheckPointItems[0].GetComponent(typeof(CheckPointItem)) as CheckPointItem; TimeTotalCheckPoint = FirstCheckPoint.CheckpointTime; }
public void PlayerCheckPointPassed(RacingGameKit.CheckPointItem PassedCheckPointItem) { //Do whatever you want }
/// <summary> /// Retrieve the checkpoint item for current checkpoint bonus time /// </summary> /// <param name="PassedCheckPoint"></param> public void PlayerPassedCheckPoint(CheckPointItem PassedCheckPoint) { TimeTotalCheckPoint += PassedCheckPoint.CheckpointBonus; }