/**--------------------------------------------------------------------------------- * Setting up ghost timer, same as in playerscript. */ public void SetupGhostTimer() { GameObject ghostTimerGameObj = GameObject.Find("ghostTimer"); ghostTimerObj = ghostTimerGameObj.GetComponent<TimerGhost>(); ghostTimerObj.f_time = 0; ghostTimerObj.TimerRunning = true; }
/**--------------------------------------------------------------------------------- * Exectues at start */ void Start() { index = 0; rotationTarget = World.Instance.StartDirection.y; rb = GetComponent<Rigidbody>(); bc = GetComponent<BoxCollider>(); ghostTimerGameObj = GameObject.Find("ghostTimer"); ghostTimerObj = ghostTimerGameObj.GetComponent<TimerGhost>(); }