예제 #1
0
 void OnGUI()
 {
     if (this.propertyIterator < this.properties.Count)
     {
         DialogProperty property = this.properties[this.propertyIterator];
         Text           text     = this.mainDialog.GetComponentInChildren <Text>();
         if (text != null)
         {
             text.text = property.dialogText.message;
         }
         if (property.changePosition)
         {
             if (this.dialogTransform != null)
             {
                 this.dialogTransform.anchoredPosition = property.dialogText.position.UnnormalizePosition();
             }
         }
         if (property.showArrow)
         {
             this.arrowTransform.anchoredPosition = property.dialogArrow.position;
             this.arrowTransform.localRotation    = Quaternion.Euler(0f, 0f, property.dialogArrow.angle);
         }
         else
         {
             this.arrowTransform.anchoredPosition = new Vector2(0f, 260f);
         }
     }
 }
예제 #2
0
        private IEnumerator CR_DialogSwitch()
        {
            DialogProperty property = this.properties[this.propertyIterator];

            if (property.elapsedTime > 0f)
            {
                if (this.mainDialog.activeSelf)
                {
                    this.mainDialog.SetActive(false);
                }
                if (this.arrow.activeSelf)
                {
                    this.arrow.SetActive(false);
                }
                this.properties[this.propertyIterator] = property;
                yield return(new WaitForSeconds(property.elapsedTime));
            }
            if (!this.mainDialog.activeSelf)
            {
                this.mainDialog.SetActive(true);
            }
            if (!this.arrow.activeSelf)
            {
                this.arrow.SetActive(true);
            }
            this.runCoroutine = false;
        }