Example #1
0
	void ConsiderTriggering(LuckHolder lh = null) {
		float threshold = tension*.3f;
		if (lh != null) { // Case on Trigger Enter
			float unluck = lh.GetUnluckyFactor ();

			threshold = unluck * 0.9f + tension * 0.1f;
		}

		if (Random.Range (0.1f, 1f) < threshold) {
            activated = true;

			Debug.Log ("Trigered");
            activateCallback.Invoke ();
		}
	}