예제 #1
0
        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,
            };
        }
예제 #3
0
        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,
            };
        }
예제 #4
0
파일: SearchUI.cs 프로젝트: minkooz/AxeMan
        public GameObject SearchCanvas(CanvasTag canvasTag)
        {
            var ea = new SearchingCanvasEventArgs(canvasTag.ToString());

            OnSearchingCanvas(ea);

            return(ea.Data);
        }
예제 #5
0
파일: SearchUI.cs 프로젝트: minkooz/AxeMan
        public GameObject[] Search(CanvasTag canvasTag)
        {
            var ea = new SearchingUIEventArgs(canvasTag.ToString(),
                                              new Stack <GameObject>());

            OnSearchingUI(ea);

            return(ea.Data.ToArray());
        }
예제 #6
0
 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);
        }
예제 #8
0
        private CanvasTag FindLastTagWithActualText(IList <CanvasTag> canvasTagHierarchy)
        {
            CanvasTag lastActualText = null;

            foreach (CanvasTag tag in canvasTagHierarchy)
            {
                if (tag.GetActualText() != null)
                {
                    lastActualText = tag;
                    break;
                }
            }
            return(lastActualText);
        }
예제 #9
0
        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;
            }
        }
예제 #10
0
        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;
     }
 }
예제 #12
0
 private void Awake()
 {
     canvasTag = CanvasTag.Canvas_World;
 }
예제 #13
0
 private void Awake()
 {
     canvasTag = CanvasTag.Canvas_PCStatus_Left;
 }
예제 #14
0
 private void Awake()
 {
     canvasTag = CanvasTag.Canvas_PCStatus_Middle;
 }
예제 #15
0
파일: SearchUI.cs 프로젝트: minkooz/AxeMan
 public Text SearchText(CanvasTag canvasTag, UITag uiTag)
 {
     return(Search(canvasTag, uiTag).GetComponent <Text>());
 }
예제 #16
0
파일: SearchUI.cs 프로젝트: minkooz/AxeMan
 public GameObject Search(CanvasTag canvasTag, UITag uiTag)
 {
     return(Search(Search(canvasTag), uiTag));
 }
예제 #17
0
 public override PdfCanvas OpenTag(CanvasTag tag)
 {
     NUnit.Framework.Assert.AreEqual(this.tagsToCompare.JRemoveFirst(), tag);
     return(null);
 }
예제 #18
0
 private void Awake()
 {
     canvasTag = CanvasTag.Canvas_Log;
 }
예제 #19
0
 private void Awake()
 {
     canvasTag = CanvasTag.Canvas_BuildSkill;
 }
예제 #20
0
 private void Awake()
 {
     canvasTag = CanvasTag.Canvas_Main;
 }
예제 #21
0
 private void Awake()
 {
     canvasTag = CanvasTag.Canvas_PCStatus_HPSkill;
 }
예제 #22
0
 private void Awake()
 {
     canvasTag = CanvasTag.Canvas_World;
     uiDict    = new Dictionary <UITag, Text>();
 }
예제 #23
0
파일: UIManager.cs 프로젝트: minkooz/AxeMan
 public void SwitchCanvas(CanvasTag cTag, bool switchOn)
 {
     GetComponent <SearchUI>().SearchCanvas(cTag)
     .GetComponent <CanvasGroup>().alpha
         = switchOn ? 1 : 0;
 }
예제 #24
0
 private void Awake()
 {
     canvasTag = CanvasTag.Canvas_Start;
 }
예제 #25
0
 private void Awake()
 {
     canvasTag = CanvasTag.Canvas_Message;
 }
예제 #26
0
 private void Awake()
 {
     canvasTag = CanvasTag.Canvas_Help;
 }