private void ShowErrorMessage(string p = null)
    {
        showingErrorMessage = true;
        if (!String.IsNullOrEmpty(p))
        {
            errorMessage.Text = p;
        }

        var tween = errorMessage.GetComponent <dfTweenFloat>();

        tween.StartValue = errorMessage.Opacity;
        tween.EndValue   = 1;
        if (!tween.IsPlaying && tween.EndValue != errorMessage.Opacity)
        {
            tween.Play();
        }
    }
Ejemplo n.º 2
0
    public void DisplayNumber(float damage, GameObject goj, float offset, Color color)
    {
        //dfLabel itemPickupLabel = numberLabel.Spawn().GetComponent<dfLabel>();

        dfLabel itemPickupLabel = numberLabel.Spawn();

        uiRoot.AddControl(itemPickupLabel);

        var temp = (int)damage;

        itemPickupLabel.Color   = color;
        itemPickupLabel.Text    = temp.ToString();
        itemPickupLabel.Opacity = 1;

        var follow = itemPickupLabel.GetComponent <DamageEvents>();

        follow.attach  = goj;
        follow.offset  = new Vector3(0, offset, 0);
        follow.enabled = true;
    }
Ejemplo n.º 3
0
 private void Start()
 {
     GetComponent <AudioSource>().Play();
     labelLoading.GetComponent <dfTweenFloat>().Play();
 }
 internal void LevelChangedHandler(int levelValue)
 {
     incomingLevelLabel.Text = levelValue.ToString();
     levelLabel.GetComponent <dfTweenVector3>().Play();
     incomingLevelLabel.GetComponent <dfTweenVector3>().Play();
 }