예제 #1
0
 //what will happen when spell is cast
 public override void useSpell(BallBehavior obj)
 {
     obj.GetComponent<Rigidbody>().AddForce(new Vector3(0, 5f, 0), ForceMode.Impulse);
 }
예제 #2
0
 private void DeactivateBall(BallBehavior ballToDeactivate)
 {
     ballToDeactivate.GetComponent <Rigidbody>().isKinematic = true;
     ballToDeactivate.gameObject.SetActive(false);
 }