Esempio n. 1
0
 public bool Has <T>(out T component) where T : Component
 {
     ComponentHelper.Assert <T>();
     try {
         component = ComponentHelper.CallGet <T>(Handle);
         return(true);
     } catch (Exception) {
         component = default;
         return(false);
     }
 }
Esempio n. 2
0
        public T Get <T>() where T : Component
        {
            ComponentHelper.Assert <T>();

            /*var registerAs = ComponentHelper.GetRegisterAs<T>();
             * if (registerAs != null) {
             *  return registerAs.CallGet<T>(Handle);
             * }
             * return Handle.Get<T>();*/

            return(ComponentHelper.CallGet <T>(Handle));
        }