Ejemplo n.º 1
0
 public void Clear()
 {
     this.ev                 = null;
     this.def                = null;
     this.firstBlock         = null;
     this.hasUndefinedblocks = false;
     this.unlinkedBlocks.Clear();
 }
 public override void AddEvent(BloxEvent ev)
 {
     if ("Game Systems/Startup/OnBootstrapDone".Equals(ev.ident))
     {
         this.events.Add(ev);
     }
     else
     {
         Debug.LogError("This event handler can't handle: " + ev.ident);
     }
 }
Ejemplo n.º 3
0
        public void Clear()
        {
            this._loading = false;
            plyEdCoroutine loader = this._loader;

            if (loader != null)
            {
                loader.Stop();
            }
            this.ev                 = null;
            this.def                = null;
            this.firstBlock         = null;
            this.hasUndefinedblocks = false;
            this.unlinkedBlocks.Clear();
        }
Ejemplo n.º 4
0
 public override void AddEvent(BloxEvent ev)
 {
     if ("Game Systems/Startup/OnSpashScreenShown".Equals(ev.ident))
     {
         this.events0.Add(ev);
     }
     else if ("Game Systems/Startup/OnSpashScreenHidden".Equals(ev.ident))
     {
         this.events1.Add(ev);
     }
     else if ("Game Systems/Startup/OnSpashScreensDone".Equals(ev.ident))
     {
         this.events2.Add(ev);
     }
     else
     {
         Debug.LogError("This event handler can't handle: " + ev.ident);
     }
 }
Ejemplo n.º 5
0
 public override void AddEvent(BloxEvent ev)
 {
     if ("Game Systems/AreaTrigger/OnAreaTriggerEnter".Equals(ev.ident))
     {
         this.events0.Add(ev);
     }
     else if ("Game Systems/AreaTrigger/OnAreaTriggerExit".Equals(ev.ident))
     {
         this.events1.Add(ev);
     }
     else if ("Game Systems/AreaTrigger/OnAreaTriggerStay".Equals(ev.ident))
     {
         this.events2.Add(ev);
     }
     else
     {
         Debug.LogError("This event handler can't handle: " + ev.ident);
     }
 }
Ejemplo n.º 6
0
 public void Set(BloxEvent ev, bool forScriptGen = false)
 {
     Debug.Log("Set ", "BloxEventEd", UnityEngine.Color.green);
     if (this.ev != ev)
     {
         this.hasUndefinedblocks = false;
         this.Clear();
         if (ev != null)
         {
             this.def = BloxEd.Instance.FindEventDef(ev);
             if (this.def != null)
             {
                 this.ev = ev;
                 if (forScriptGen)
                 {
                     Debug.Log("forScriptGen " + forScriptGen, "BloxEventEd", UnityEngine.Color.green);
                     this.firstBlock = ((ev.firstBlock == null) ? null : new BloxBlockEd(ev.firstBlock, null, null, null, -1, false));
                     if (this.firstBlock != null)
                     {
                         BloxBlockEd next = this.firstBlock;
                         while (next.b.next != null)
                         {
                             next.next = new BloxBlockEd(next.b.next, next, null, null, -1, false);
                             next      = next.next;
                         }
                     }
                 }
                 else
                 {
                     Debug.Log("forScriptGen " + forScriptGen, "BloxEventEd", UnityEngine.Color.green);
                     this._loading = true;
                     this._loader  = plyEdCoroutine.Start(this.LoadEvent(), true);
                 }
             }
         }
     }
 }
Ejemplo n.º 7
0
 public void Set(BloxEvent ev, bool loadUnlinkedBlocks = true)
 {
     this.hasUndefinedblocks = false;
     if (this.ev != ev)
     {
         this.Clear();
         if (ev != null)
         {
             this.def = BloxEd.Instance.FindEventDef(ev);
             if (this.def != null)
             {
                 this.ev         = ev;
                 this.firstBlock = ((ev.firstBlock == null) ? null : new BloxBlockEd(ev.firstBlock, null, null, null, -1));
                 if (loadUnlinkedBlocks)
                 {
                     for (int i = 0; i < ev.unlinkedBlocks.Count; i++)
                     {
                         this.unlinkedBlocks.Add(new BloxBlockEd(ev.unlinkedBlocks[i], null, null, null, -1));
                     }
                 }
             }
         }
     }
 }