public override void Init() { locker = new TimeDurationLock (type == PENALTY_TYPE.BIG ? 2.6f : 1f, TimeDurationLock.LockMode.MAXIMUM); ballController = machine.component.GetComponent<BallController> (); if (col != null) { ballController.GetComponent<Rigidbody> ().AddExplosionForce (20, col.transform.position, 20); } }
public override void Init() { locker = new TimeDurationLock (1, TimeDurationLock.LockMode.RESET); ballController = machine.component.GetComponent<BallController> (); rb = ballController.GetComponent<Rigidbody> (); }
// Use this for initialization void Start() { text = GetComponent<Text> (); locker = new TimeDurationLock (defaultDuration, TimeDurationLock.LockMode.RESET); }