public void OnHit(SinkBall ball) { hitStart = Time.time; mat.color = hitColor; //Debug.Log("ball v=" + ball.rigidbody.velocity.ToString(".000")); ball.rigidbody.velocity = 1.1f * ball.rigidbody.velocity; AudioSource.PlayClipAtPoint(hitSound, Camera.main.transform.position); }
public void Start() { sb = GetComponentInParent<SinkBall>(); lr = GetComponent<LineRenderer>(); lr.SetVertexCount(2); lr.enabled = true; mat = lr.material; }
public void HoleComplete(SinkBall ball) { ball.HoleComplete(); if (SinkDriver.instance) { SinkDriver.instance.HoleComplete(); } if (showSuccess) { GameObject obj = (GameObject)Instantiate(successPrefab); obj.transform.position = transform.position; } }
public void OnHit(SinkBall ball) { HoleComplete(ball); }
public void OnHit(SinkBall ball) { AudioSource.PlayClipAtPoint(hitSound, Camera.main.transform.position); }
public void OnHit(SinkBall ball) { if (!isTriggered) { ButtonPressed(); } }