private EasingControl ec;                                                                               // Control de animacion
        #endregion

        #region Inicializadores
        /// <summary>
        /// <para>Inicializador de <see cref="MensajesBatallaController"/></para>
        /// </summary>
        private void Awake()        // Inicializador de MensajesBatallaController
        {
            ec              = gameObject.AddComponent <EasingControl>();
            ec.duration     = 0.5f;
            ec.equation     = EasingEquations.EaseInOutQuad;
            ec.endBehaviour = EasingControl.EndBehaviour.Constant;
            ec.updateEvent += OnUpdateEvent;
        }
示例#2
0
 private void Awake()
 {
     ec              = gameObject.AddComponent <EasingControl>();
     ec.duration     = 0.5f;
     ec.equation     = EasingEquations.EaseInOutQuad;
     ec.endBehaviour = EasingControl.EndBehaviour.Constant;
     ec.updateEvent += OnUpdateEvent;
 }
示例#3
0
 protected virtual void Awake()
 {
     easingControl = gameObject.AddComponent<EasingControl>();
     easingControl.duration = 0.5f;
     easingControl.loopType = EasingControl.LoopType.PingPong;
     easingControl.equation = EasingEquations.EaseOutExpo;
     rt = transform as RectTransform;
 }
示例#4
0
 protected virtual void Awake()
 {
     easingControl          = gameObject.AddComponent <EasingControl>();
     easingControl.duration = 0.5f;
     easingControl.loopType = EasingControl.LoopType.PingPong;
     easingControl.equation = EasingEquations.EaseOutExpo;
     rt = transform as RectTransform;
 }
示例#5
0
 void Awake()
 {
     group.alpha         = 0;
     toDisplay           = new Queue <string>();
     easing              = gameObject.AddComponent <EasingControl>();
     easing.duration     = 0.2f;
     easing.equation     = EasingEquations.EaseInOutQuad;
     easing.endBehaviour = EasingControl.EndBehaviour.Constant;
     easing.updateEvent += OnUpdateEvent;
     SequencePlaying     = false;
 }
示例#6
0
 void Start()
 {
     ec              = gameObject.AddComponent <EasingControl>();
     ec.startValue   = -5;
     ec.endValue     = 5;
     ec.duration     = 3;
     ec.loopCount    = -1;      // inifinite looping
     ec.loopType     = EasingControl.LoopType.PingPong;
     ec.equation     = EasingEquations.EaseInOutQuad;
     ec.UpdateEvent += OnUpdateEvent;
     ec.Play();
 }
示例#7
0
    public void Activate()
    {
        canvas.SetActive(true);
        if (!easing)
        {
            easing = gameObject.AddComponent <EasingControl>();
        }
        easing.duration     = 1f;
        easing.equation     = EasingEquations.EaseInOutQuad;
        easing.endBehaviour = EasingControl.EndBehaviour.Constant;
        easing.updateEvent += OnUpdateEvent;
        easing.Play();

        _seconds       = 0;
        secondsTracker = _seconds;
        minutesTracker = _seconds;

        text.text = string.Format("{0}:{1}", MinutesPassed, System.Math.Round(Mathf.Clamp(SecondsPassed - (MinutesPassed * 60), 0, 59.99f), 2));
    }
 protected virtual void Awake()
 {
     easingControl = gameObject.AddComponent <EasingControl>();
 }
示例#9
0
 void Awake()
 {
     _layoutElement = GetComponent<LayoutElement>();
     _easingControl = GetComponent<EasingControl>();
     _easingControl.loopType = EasingControl.LoopType.PingPong;
 }
示例#10
0
	protected virtual void Awake ()
	{
		easingControl = gameObject.AddComponent<EasingControl>();
	}
示例#11
0
 void Awake()
 {
     _layoutElement          = GetComponent <LayoutElement>();
     _easingControl          = GetComponent <EasingControl>();
     _easingControl.loopType = EasingControl.LoopType.PingPong;
 }