Example #1
0
 protected override void SelectKey(SelectKey <World> args)
 {
     chosenKey = args.key;
     if (chosenKey != null)
     {
         eventManager.Raise <DrawColumnEventArgs <World> >(new DrawColumnEventArgs <World>(1));
     }
 }
Example #2
0
 protected void SelectKey(SelectKey <ProvenceComponent> args)
 {
     if (chosenComponents.Contains(args.key))
     {
         chosenComponents.Remove(args.key);
     }
     else
     {
         chosenComponents.Add(args.key);
     }
     eventManager.Raise <DrawColumnEventArgs <ProvenceComponent> >(new DrawColumnEventArgs <ProvenceComponent>(1));
 }
Example #3
0
        /* protected override void BeforeAssemblyReload(){
         *  string dir = TableDirectory.GetSubKey("temp-editors",TableDirectoryKey.DIRECTORY);
         *  if(chosenKey != null) Helpers.SerializeAndSaveToFile<Entity>(chosenKey.entity,dir,windowID,".meglo");
         *
         * }
         *
         * protected override void AfterAssemblyReload(){
         *  if(windowID != null){
         *      string dir = TableDirectory.GetSubKey("temp-editors",TableDirectoryKey.DIRECTORY);
         *      string file = windowID + ".meglo";
         *      Entity entity = Helpers.LoadFromSerializedFile<Entity>(dir + file);
         *      if(entity != null) {
         *          EntityHandle entityHandle = ProvenceManager.Instance.LookUpEntity(entity);
         *          if(entityHandle != null) eventManager.Raise<SelectKey<EntityHandle>>(new SelectKey<EntityHandle>(entityHandle));
         *      }
         *      Helpers.Delay(() =>{
         *          Helpers.DeleteFolderContents(dir);
         *      },100);
         *  }
         * } */

        //Data Methods

        protected override void SelectKey(SelectKey <EntityHandle> args)
        {
            if (args.key == null)
            {
                return;
            }
            chosenKey = args.key;

            chosenKeyNameHandle = chosenKey.GetOrCreateComponent <Name>();
            ComponentHandle <UnityGameObject> objectHandle = chosenKey.GetComponent <UnityGameObject>();

            chosenGameObject = objectHandle != null ? objectHandle.component.gameObject : null;
            eventManager.Raise <DrawColumnEventArgs <ProvenceComponent> >(new DrawColumnEventArgs <ProvenceComponent>(0));
            eventManager.Raise <DrawColumnEventArgs <ProvenceComponent> >(new DrawColumnEventArgs <ProvenceComponent>(2));
        }
 protected virtual void SelectKey(SelectKey <T> args)
 {
     chosenKey = args.key;
 }
 protected override void SelectKey(SelectKey <string> args)
 {
     chosenKey = args.key;
     eventManager.Raise <DrawColumnEventArgs <string> >(new DrawColumnEventArgs <string>(1));
 }
Example #6
0
 protected override void SelectKey(SelectKey <ProvenceSystem> args)
 {
     chosenKey = args.key;
     eventManager.Raise <DrawColumnEventArgs <ProvenceSystem> >(new DrawColumnEventArgs <ProvenceSystem>(0));
 }