public void SubscribeToBike(BikeMovement bikeMovement)
 {
     bikeMovement.OnMaxBoostChange += UpdateBoostIconsDraw;
     UpdateBoostIconsDraw(bikeMovement.maxBoostTimeAvailable);
     bikeMovement.OnBoostChange += UpdateFillAmount;
     UpdateBoostIconsDraw(bikeMovement.currentBoostTimeAvailable);
 }
    public void StartStream(BikeMovement bikeGO)
    {
        createdBy          = bikeGO;
        transform.position = bikeGO.transform.position;
        startingPosition   = bikeGO.transform.position;
        this.attachedTo    = bikeGO.gameObject;
        var playerName = bikeGO.GetPlayerName();

        SetTrailColor(bikeGO.GetAccentColor());
        GetComponent <WallCollision>().SetKillfeedName(playerName);
    }
    public void ChangeFocus(GameObject bike)
    {
        if (!isLocalPlayer)
        {
            return;
        }
        currentTarget                = bike;
        mainCamera.objectToFollow    = currentTarget.transform;
        minimapCamera.objectToFollow = currentTarget.transform;
        BikeMovement newBikeMovement = bike.GetComponent <BikeMovement>();

        boostUI.SubscribeToBike(newBikeMovement);
    }
Beispiel #4
0
 public void SetBike(BikeMovement bikeMovement)
 {
     this.bikeMovement = bikeMovement;
     playerBikeGo      = bikeMovement.gameObject;
 }