예제 #1
0
 public void Add(HxObject hxObject)
 {
     Objects.Add(hxObject);
     if (hxObject is HxGameObject gameObject)
     {
         foreach (HxComponent component in gameObject.Components)
         {
             if (component is HxBehaviour behaviour)
             {
                 if (behaviour is HxIUpdate iUpdate)
                 {
                     IUpdates.Add(iUpdate);
                 }
                 if (behaviour is HxIStart iStart)
                 {
                     IStarts.Add(iStart);
                 }
                 if (behaviour is HxIOnCollisionEnter iOnCollisionEnter)
                 {
                     HxIOnCollisionEnters.Add(iOnCollisionEnter);
                 }
             }
         }
     }
 }
예제 #2
0
        public static HxObject Instantiate(HxObject original)
        {
            HxObject copy = (HxObject)original.Clone();

            return(copy);
        }