示例#1
0
 protected void AddInitial(WakeSystemEvent args)
 {
     foreach (Dictionary <Entity, ProvenceComponent> dict in new List <Dictionary <Entity, ProvenceComponent> >(initialCopy.Values))
     {
         foreach (KeyValuePair <Entity, ProvenceComponent> kvp in dict)
         {
             AddInitialComponent(kvp.Key, (dynamic)kvp.Value);
         }
     }
 }
示例#2
0
 protected void LoadGameObjects(WakeSystemEvent args)
 {
     foreach (GameObject gameObject in UnityEngine.Object.FindObjectsOfType <GameObject>())
     {
         EntityHandle entityHandle = world.LookUpEntity((Entity)gameObject.name);
         if (entityHandle != null)
         {
             ComponentHandle <UnityGameObject> objectHandle = entityHandle.GetOrCreateComponent <UnityGameObject>();
             objectHandle.component.gameObject = gameObject;
         }
     }
 }
示例#3
0
 public override void Awaken(WakeSystemEvent args)
 {
     bwShader = new ProvenceAsset <Shader>("BWShader");
     bwMat    = new Material(bwShader.asset);
 }
示例#4
0
 public override void Awaken(WakeSystemEvent args)
 {
 }