Exemplo n.º 1
0
        public static bool IsQueueContain(GameObject skillSender, string userId, string skillName)
        {
            BaseBehavior baseBehaviorComponent = skillSender.GetComponent <BaseBehavior>();

            if (baseBehaviorComponent != null && baseBehaviorComponent.ownerId == userId)
            {
                return(baseBehaviorComponent.IsQueueContain(skillName));
            }
            return(false);
        }
Exemplo n.º 2
0
 public static bool IsAnyQueueContain(string userId, string skillName)
 {
     foreach (GameObject unit in GameObject.FindGameObjectsWithTag("Building"))
     {
         BaseBehavior baseBehaviorComponent = unit.GetComponent <BaseBehavior>();
         if (baseBehaviorComponent != null && baseBehaviorComponent.ownerId == userId)
         {
             if (baseBehaviorComponent.IsQueueContain(skillName))
             {
                 return(true);
             }
         }
     }
     return(false);
 }