コード例 #1
0
    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();
        }
    }
コード例 #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;
    }
コード例 #3
0
 private void Start()
 {
     GetComponent <AudioSource>().Play();
     labelLoading.GetComponent <dfTweenFloat>().Play();
 }
コード例 #4
0
 internal void LevelChangedHandler(int levelValue)
 {
     incomingLevelLabel.Text = levelValue.ToString();
     levelLabel.GetComponent <dfTweenVector3>().Play();
     incomingLevelLabel.GetComponent <dfTweenVector3>().Play();
 }