Пример #1
0
 public void RemoveAffector <TAffector>(TAffector affector)
     where TAffector : Component, IDamageAffector
 {
     ThrowIf.ArgumentIsNull(affector, "affector");
     ThrowIf.False((DamageChain)affector.DamageChain == this, "Trying to remove a affector from another chain.");
     Object.Destroy(affector);
 }
Пример #2
0
 /// <summary>
 /// Throws an exception if the SingletonBehavior does not exist in the scene.
 /// </summary>
 public static void ThrowIfMissing()
 {
     ThrowIf.False(Exists, "SingletonBehaviour {0} does not exist", typeof(T).Name);
 }