public static void LoadPage(int nPage) { MediaList.Clear(); UIMgr.clearLayer(); XmlStage.LoadPage(nPage); }
public void OnPointerDown(BaseEventData arg0)//点选目录视频,eventTrigger事件 { XmlPic2D toggle = XmlStage.GetAsset2D(actButton.assetID); if (toggle != null) { Image img = GetComponent <Image>(); img.sprite = toggle.PicPress; } }
public void OnPointerUp(BaseEventData arg0)//点选目录视频,eventTrigger事件 { XmlPic2D toggle = XmlStage.GetAsset2D(actButton.assetID); if (toggle != null) { XmlEvent @event = XmlStage.GetEvent(strEvent); EventMgr.startEvent(@event); Image img = GetComponent <Image>(); img.sprite = toggle.PicNormal; } }
public void OnButtonClick(BaseEventData arg0) { XmlPic2D toggle = XmlStage.GetAsset2D(actButton.assetID); if (toggle != null) { Image img = GetComponent <Image>(); img.sprite = toggle.PicNormal; } XmlEvent @event = XmlStage.GetEvent(strEvent); EventMgr.startEvent(@event); }
public virtual void Init(ActBase a) { actPic = a as _show_pic; XmlPic2D xmlPic = XmlStage.GetAsset2D(actPic.assetID); if (xmlPic == null) { Debug.LogError("显示图片错误,找不到文件按 " + actPic.assetID + "in stage " + XmlStage.curStage.id); return; } xmlPic.InitSprite(); Sprite tex = xmlPic.PicNormal;// Resources.Load<Sprite>(XmlStage.filePath + btn.picNormal.fileName); InitPos(tex, actPic.pos, xmlPic.scale, actPic.angle); }
public RandomXmlStream(int seed) { _names = new Stack(); _buffer = new FifoBuffer(); _isDone = false; _rand = new Random(seed); if (GetRandomBool()) { BuildXmlDeclaration(); } _stage = XmlStage.BeforeMainDocument; _nodeCount = GetRandomExp(6); }
public void SetEvent(_run_event act) { actRun = act; theEvent = XmlStage.GetEvent(actRun.eventID); if (theEvent != null) { theEvent.Start(); } else { Debug.Log("Event NULL"); } }
public override void Init(ActBase act) { actButton = act as _show_button; strEvent = actButton.strEvent; XmlPic2D xml = XmlStage.GetAsset2D(actButton.assetID); if (xml != null) { xml.InitSprite(); strEvent = actButton.strEvent; Sprite tex = xml.PicNormal; InitPos(tex, actButton.pos, xml.scale, 0); } }
public static void LoadLevel() { UIMgr.clearLayer(); XmlStage.Clear(); }
private void BuildXmlParts() { switch (_stage) { case XmlStage.BeforeMainDocument: if (_nodeCount == 0) { _stage = XmlStage.InMainDocument; _nodeCount = GetRandomExp(16); BuildStartElement(_nodeCount == 0); return; } _nodeCount--; switch (GetRandom(3)) { case 0: // Comment BuildComment(); break; case 1: // PI BuildPI(); break; case 2: // Space BuildSpace(); break; } break; case XmlStage.InMainDocument: if (_nodeCount == 0) { if (_names.Count > 0) { BuildEndElement(); return; } _stage = XmlStage.AfterMainDocument; _nodeCount = GetRandomExp(6); goto case XmlStage.AfterMainDocument; } _nodeCount--; while (true) { switch (GetRandom(7)) { case 0: // Comment BuildComment(); return; case 1: // PI BuildPI(); return; case 2: // Space BuildSpace(); return; case 3: // CDATA BuildCDATA(); return; case 4: // Text BuildText(); return; case 5: // StartElement BuildStartElement(true); return; case 6: // EndElement if (_names.Count > 1) { BuildEndElement(); return; } break; } } case XmlStage.AfterMainDocument: if (_nodeCount == 0) { _isDone = true; return; } _nodeCount--; switch (GetRandom(3)) { case 0: // Comment BuildComment(); break; case 1: // PI BuildPI(); break; case 2: // Space BuildSpace(); break; } break; } }
public static void startEvent(string evtName) { XmlEvent evt = XmlStage.GetEvent(evtName); startEvent(evt); }