void Start() { WaypointAngle = 0.0f; fPathLength = defaultPathLength; fNextPathLength = defaultPathLength; CurrentPercent = 0.0f; hInGameScript = this.GetComponent <InGameScript>() as InGameScript; hControllerScript = this.GetComponent <ControllerScript>() as ControllerScript; hPatchesRandomizer = this.GetComponent <PatchesRandomizer>() as PatchesRandomizer; hElementsGenerator = this.GetComponent <ElementsGenerator>() as ElementsGenerator; }
void Start() { iCurrentPNum = 1; fPreviousTotalDistance = 0.0f; hInGameScript = this.GetComponent <InGameScript>() as InGameScript; hCheckPointsMain = GetComponent <CheckPointsMain>() as CheckPointsMain; hElementsGenerator = this.GetComponent <ElementsGenerator>() as ElementsGenerator; instantiateStartPatch(); goPreviousPatch = goCurrentPatch; tPlayer = GameObject.Find("Player").transform; hCheckPointsMain.setChildGroups(); hCheckPointsMain.SetCurrentPatchCPs(); hCheckPointsMain.SetNextPatchCPs(); }