예제 #1
0
 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);
 }
예제 #2
0
 public void Start()
 {
     sb = GetComponentInParent<SinkBall>();
     lr = GetComponent<LineRenderer>();
     lr.SetVertexCount(2);
     lr.enabled = true;
     mat = lr.material;
 }
예제 #3
0
 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;
     }
 }
예제 #4
0
 public void OnHit(SinkBall ball)
 {
     HoleComplete(ball);
 }
예제 #5
0
 public void OnHit(SinkBall ball)
 {
     AudioSource.PlayClipAtPoint(hitSound, Camera.main.transform.position);
 }
예제 #6
0
 public void OnHit(SinkBall ball)
 {
     if (!isTriggered) {
         ButtonPressed();
     }
 }