private void Awake() { canvasTag = CanvasTag.Canvas_ExamineMode; sortedFlaws = new SkillComponentTag[] { SkillComponentTag.FireFlaw, SkillComponentTag.WaterFlaw, SkillComponentTag.AirFlaw, SkillComponentTag.EarthFlaw, }; sortedStatusText = new UITag[] { UITag.Status1Text, UITag.Status2Text, UITag.Status3Text, UITag.Status4Text, }; sortedStatusData = new UITag[] { UITag.Status1Data, UITag.Status2Data, UITag.Status3Data, UITag.Status4Data, }; }
private void Awake() { canvasTag = CanvasTag.Canvas_PCStatus_CurrentStatus; orderedComponents = new SkillComponentTag[] { SkillComponentTag.FireMerit, SkillComponentTag.WaterMerit, SkillComponentTag.AirMerit, SkillComponentTag.EarthMerit, SkillComponentTag.FireFlaw, SkillComponentTag.WaterFlaw, SkillComponentTag.AirFlaw, SkillComponentTag.EarthFlaw, }; orderedStatusName = new UITag[] { UITag.Status1Text, UITag.Status2Text, UITag.Status3Text, UITag.Status4Text, }; orderedStatusData = new UITag[] { UITag.Status1Data, UITag.Status2Data, UITag.Status3Data, UITag.Status4Data, }; }
private void Awake() { canvasTag = CanvasTag.Canvas_PCStatus_SkillData; uiCurseText = new UITag[] { UITag.Status1Text, UITag.Status2Text, UITag.Status3Text, }; uiCurseData = new UITag[] { UITag.Status1Data, UITag.Status2Data, UITag.Status3Data, }; printEffect = new SkillTypeTag[] { SkillTypeTag.Curse, SkillTypeTag.Buff, }; sortedCurse = new SkillComponentTag[] { SkillComponentTag.FireCurse, SkillComponentTag.WaterCurse, SkillComponentTag.AirCurse, SkillComponentTag.EarthCurse, }; sortedEnhance = new SkillComponentTag[] { SkillComponentTag.FireMerit, SkillComponentTag.WaterMerit, SkillComponentTag.AirMerit, SkillComponentTag.EarthMerit, }; }
public GameObject SearchCanvas(CanvasTag canvasTag) { var ea = new SearchingCanvasEventArgs(canvasTag.ToString()); OnSearchingCanvas(ea); return(ea.Data); }
public GameObject[] Search(CanvasTag canvasTag) { var ea = new SearchingUIEventArgs(canvasTag.ToString(), new Stack <GameObject>()); OnSearchingUI(ea); return(ea.Data.ToArray()); }
public void SwitchCanvasVisibility(CanvasTag cTag, bool switchOn) { if (!canvasDict.ContainsKey(cTag)) { canvasDict[cTag] = GetComponent <SearchUI>().SearchCanvas(cTag) .GetComponent <CanvasGroup>(); } canvasDict[cTag].alpha = switchOn ? 1 : 0; }
private CanvasTag FindLastTagWithActualText(IList <CanvasTag> canvasTagHierarchy) { CanvasTag result = null; foreach (CanvasTag current in canvasTagHierarchy) { if (current.GetActualText() != null) { result = current; break; } } return(result); }
private CanvasTag FindLastTagWithActualText(IList <CanvasTag> canvasTagHierarchy) { CanvasTag lastActualText = null; foreach (CanvasTag tag in canvasTagHierarchy) { if (tag.GetActualText() != null) { lastActualText = tag; break; } } return(lastActualText); }
public virtual void EventOccurred(IEventData data, EventType type) { if (type.Equals(EventType.RENDER_TEXT)) { TextRenderInfo renderInfo = (TextRenderInfo)data; LineSegment segment = renderInfo.GetBaseline(); if (renderInfo.GetRise() != 0) { // remove the rise from the baseline - we do this because the text from a super/subscript render operations should probably be considered as part of the baseline of the text the super/sub is relative to Matrix riseOffsetTransform = new Matrix(0, -renderInfo.GetRise()); segment = segment.TransformBy(riseOffsetTransform); } if (useActualText) { CanvasTag lastTagWithActualText = lastTextRenderInfo != null?FindLastTagWithActualText(lastTextRenderInfo .GetCanvasTagHierarchy()) : null; if (lastTagWithActualText != null && lastTagWithActualText == FindLastTagWithActualText(renderInfo.GetCanvasTagHierarchy ())) { // Merge two text pieces, assume they will be in the same line LocationTextExtractionStrategy.TextChunk lastTextChunk = locationalResult[locationalResult.Count - 1]; Vector mergedStart = new Vector(Math.Min(lastTextChunk.GetLocation().GetStartLocation().Get(0), segment.GetStartPoint ().Get(0)), Math.Min(lastTextChunk.GetLocation().GetStartLocation().Get(1), segment.GetStartPoint().Get (1)), Math.Min(lastTextChunk.GetLocation().GetStartLocation().Get(2), segment.GetStartPoint().Get(2))); Vector mergedEnd = new Vector(Math.Max(lastTextChunk.GetLocation().GetEndLocation().Get(0), segment.GetEndPoint ().Get(0)), Math.Max(lastTextChunk.GetLocation().GetEndLocation().Get(1), segment.GetEndPoint().Get(1) ), Math.Max(lastTextChunk.GetLocation().GetEndLocation().Get(2), segment.GetEndPoint().Get(2))); LocationTextExtractionStrategy.TextChunk merged = new LocationTextExtractionStrategy.TextChunk(lastTextChunk .GetText(), tclStrat.CreateLocation(renderInfo, new LineSegment(mergedStart, mergedEnd))); locationalResult[locationalResult.Count - 1] = merged; } else { String actualText = renderInfo.GetActualText(); LocationTextExtractionStrategy.TextChunk tc = new LocationTextExtractionStrategy.TextChunk(actualText != null ? actualText : renderInfo.GetText(), tclStrat.CreateLocation(renderInfo, segment)); locationalResult.Add(tc); } } else { LocationTextExtractionStrategy.TextChunk tc = new LocationTextExtractionStrategy.TextChunk(renderInfo.GetText (), tclStrat.CreateLocation(renderInfo, segment)); locationalResult.Add(tc); } lastTextRenderInfo = renderInfo; } }
private void Awake() { canvasTag = CanvasTag.Canvas_PCStatus_SkillFlawEffect; orderedFlawEffect = new SkillComponentTag[] { SkillComponentTag.FireFlaw, SkillComponentTag.WaterFlaw, SkillComponentTag.AirFlaw, SkillComponentTag.EarthFlaw, }; orderedUIText = new UITag[] { UITag.Status1Text, UITag.Status2Text, UITag.Status3Text, }; orderedUIData = new UITag[] { UITag.Status1Data, UITag.Status2Data, UITag.Status3Data, }; }
public virtual void EventOccurred(IEventData data, EventType type) { if (type.Equals(EventType.RENDER_TEXT)) { TextRenderInfo textRenderInfo = (TextRenderInfo)data; LineSegment lineSegment = textRenderInfo.GetBaseline(); if (textRenderInfo.GetRise() != 0f) { Matrix m = new Matrix(0f, -textRenderInfo.GetRise()); lineSegment = lineSegment.TransformBy(m); } if (this.useActualText) { CanvasTag canvasTag = (this.lastTextRenderInfo != null) ? this.FindLastTagWithActualText(this.lastTextRenderInfo.GetCanvasTagHierarchy()) : null; if (canvasTag != null && canvasTag == this.FindLastTagWithActualText(textRenderInfo.GetCanvasTagHierarchy())) { LocationTextExtractionStrategy2.TextChunk textChunk = this.locationalResult[this.locationalResult.Count - 1]; Vector startPoint = new Vector(Math.Min(textChunk.GetLocation().GetStartLocation().Get(0), lineSegment.GetStartPoint().Get(0)), Math.Min(textChunk.GetLocation().GetStartLocation().Get(1), lineSegment.GetStartPoint().Get(1)), Math.Min(textChunk.GetLocation().GetStartLocation().Get(2), lineSegment.GetStartPoint().Get(2))); Vector endPoint = new Vector(Math.Max(textChunk.GetLocation().GetEndLocation().Get(0), lineSegment.GetEndPoint().Get(0)), Math.Max(textChunk.GetLocation().GetEndLocation().Get(1), lineSegment.GetEndPoint().Get(1)), Math.Max(textChunk.GetLocation().GetEndLocation().Get(2), lineSegment.GetEndPoint().Get(2))); LocationTextExtractionStrategy2.TextChunk value = new LocationTextExtractionStrategy2.TextChunk(textChunk.GetText(), this.tclStrat.CreateLocation(textRenderInfo, new LineSegment(startPoint, endPoint))); this.locationalResult[this.locationalResult.Count - 1] = value; } else { string actualText = textRenderInfo.GetActualText(); LocationTextExtractionStrategy2.TextChunk item = new LocationTextExtractionStrategy2.TextChunk((actualText != null) ? actualText : textRenderInfo.GetText(), this.tclStrat.CreateLocation(textRenderInfo, lineSegment)); this.locationalResult.Add(item); } } else { LocationTextExtractionStrategy2.TextChunk item2 = new LocationTextExtractionStrategy2.TextChunk(textRenderInfo.GetText(), this.tclStrat.CreateLocation(textRenderInfo, lineSegment)); this.locationalResult.Add(item2); } this.lastTextRenderInfo = textRenderInfo; } }
private void Awake() { canvasTag = CanvasTag.Canvas_World; }
private void Awake() { canvasTag = CanvasTag.Canvas_PCStatus_Left; }
private void Awake() { canvasTag = CanvasTag.Canvas_PCStatus_Middle; }
public Text SearchText(CanvasTag canvasTag, UITag uiTag) { return(Search(canvasTag, uiTag).GetComponent <Text>()); }
public GameObject Search(CanvasTag canvasTag, UITag uiTag) { return(Search(Search(canvasTag), uiTag)); }
public override PdfCanvas OpenTag(CanvasTag tag) { NUnit.Framework.Assert.AreEqual(this.tagsToCompare.JRemoveFirst(), tag); return(null); }
private void Awake() { canvasTag = CanvasTag.Canvas_Log; }
private void Awake() { canvasTag = CanvasTag.Canvas_BuildSkill; }
private void Awake() { canvasTag = CanvasTag.Canvas_Main; }
private void Awake() { canvasTag = CanvasTag.Canvas_PCStatus_HPSkill; }
private void Awake() { canvasTag = CanvasTag.Canvas_World; uiDict = new Dictionary <UITag, Text>(); }
public void SwitchCanvas(CanvasTag cTag, bool switchOn) { GetComponent <SearchUI>().SearchCanvas(cTag) .GetComponent <CanvasGroup>().alpha = switchOn ? 1 : 0; }
private void Awake() { canvasTag = CanvasTag.Canvas_Start; }
private void Awake() { canvasTag = CanvasTag.Canvas_Message; }
private void Awake() { canvasTag = CanvasTag.Canvas_Help; }