示例#1
0
 public void RegisterOnHit(NoxUnit whatUnit)
 {
     if (whatUnit.ContainsOnHit(Id))
     {
         whatUnit.GetOnHit(Id).Count++;
     }
     else
     {
         whatUnit.AddOnHit(Id, new OnHit(this));
     }
 }
示例#2
0
 public void UnregisterOnHit(NoxUnit whatUnit)
 {
     if (whatUnit.ContainsOnHit(Id))
     {
         OnHit hit = whatUnit.GetOnHit(Id);
         hit.Count--;
         if (hit.Count == 0)
         {
             whatUnit.RemoveOnHit(Id);
         }
     }
 }
示例#3
0
 public bool ContainsOnHit(NoxUnit whatUnit)
 {
     return(whatUnit.ContainsOnHit(Id));
 }