Пример #1
0
    public void StartTracking()
    {
        followScript = GetComponent <BezierFollowV2>();
        if (isMultiplayer == true)
        {
            peerId = GetComponent <PlayerStats>().peerId;
            RealTimeClient.Instance.StatsUpdate += GetPositions;
            if (peerId == RealTimeClient.Instance.peerId)
            {
                StartCoroutine("UpdateServerStats");
            }
        }

        if (circuit == null)
        {
            Debug.Log("Failed to find circuit gameobject, possible tag missing.");
        }

        startTrack = true;

        // Makes sure everything is inital
        Reset();
    }
Пример #2
0
 private void Start()
 {
     // Get the components for the animator and follow
     animator = GetComponentInChildren <Animator>();
     follow   = GetComponentInParent <BezierFollowV2>();
 }