Ejemplo n.º 1
0
    private void InitiateLatch(GameObject target)
    {
        this.StopAllCoroutines();
        this.lassoLine.SetPosition(0, this.transform.position);
        this.lassoLine.SetPosition(1, target.transform.position);
        Destroy(this.lassoTip);

        this.latchedBoi = target.GetComponent <BaseBoi>();

        this.latchedBoi.OnCapture += this.DestroyLasso;
    }
Ejemplo n.º 2
0
    private void LatchDisengaged()
    {
        ParticleSystemRenderer particleRenderer = this.wrangledPointsParticles.GetComponent <ParticleSystemRenderer>();

        //this.latchedBoi.OnCapture -= LatchDisengaged;
        switch (this.latchedBoiName)
        {
        case "EasyPinkie":
            particleRenderer.material = Resources.Load <Material>("Materials/Plus10");
            GameManager.instance.easyPinkieCount++;
            break;

        case "TutorialBoi":
            particleRenderer.material = Resources.Load <Material>("Materials/Plus10");
            break;

        case "GoldenBoi":
            this.rareBoiSound.Play();
            particleRenderer.material = Resources.Load <Material>("Materials/GoldBar");
            GameManager.instance.goldenBoiCount++;
            break;

        case "Beefcake":
            this.rareBoiSound.Play();
            particleRenderer.material = Resources.Load <Material>("Materials/MoneyBag");
            GameManager.instance.beefcakeCount++;
            break;

        default:
            Debug.LogError("Error: Unknown Boi Type=" + this.latchedBoi.boiStats.boiName);
            break;
        }

        this.latchedBoi         = null;
        this.currentPlayerState = PlayerState.Moving;
        CameraFollow.ReturnToFollow();

        this.wrangledPointsParticles.Play();
    }
Ejemplo n.º 3
0
    private void LatchInitiated(GameObject target)
    {
        //Only latch one boi at a time
        if (this.latchedBoi != null)
        {
            return;
        }

        this.currentIncrementalPitch = this.beginningIncrementalPitch;

        this.PauseVelocityMovement();
        this.currentPlayerState    = PlayerState.Latched;
        this.latchedBoi            = target.GetComponent <BaseBoi>();
        this.latchedBoi.OnCapture += LatchDisengaged;
        this.latchedBoi.StopAllCoroutines();
        this.latchedBoi.SignalLatch();
        this.latchedBoiName = this.latchedBoi.boiStats.name;
        CameraFollow.InitiateShowcaseSnap(this.GetMidpoint(target.transform.position));

        this.wrangledSound.pitch = this.GetRandomSoundPitch();
        this.wrangledSound.Play();
    }