Esempio n. 1
0
 /// <summary>
 /// Verifies that properties and attributes have been used correctly, based on certain rules enforced to guarantee that unintended behavior & usage doesn't occur at scale.
 /// </summary>
 /// <param name="el"></param>
 public void ValidatePropertiesAndAttributes(GameElement el)
 {
     if (ElementPool.FindAll(x => !string.IsNullOrEmpty(el.Id) && x.GetComponent <GameElement>() && x.GetComponent <GameElement>().Id == el.Id).Count > 1)
     {
         logger.LogError($"Multiple elements have the same \"Id\" of \"{el.Id}\". The Id attribute must be unique.");
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Puts a new GameElement into the limited pool of GameObjects that have been registered as being of interest to Automated Testing.
 /// </summary>
 /// <param name="el"></param>
 public void RegisterElement(GameElement el)
 {
     ElementPool.Add(el.gameObject);
 }