【问题标题】:Show CCLabel for few seconds on touch触摸时显示 CCLabel 几秒钟
【发布时间】:2016-12-16 09:11:04
【问题描述】:

我是 Cocos Sharp 的新手,一直在努力实现问题标题中的行为。我想向用户显示消息,该消息将在一段时间后消失或消失,例如 3 秒,在用户触摸某些精灵后。但我不知道该怎么做。

我正在像这样显示 CCLabel:

var scoreLabel = new CCLabel("Touch Menu and Exit button together to exit!", "Arial", 50, CCLabelFormat.SystemFont);
scoreLabel.PositionX = button.PositionX;
scoreLabel.PositionY = button.PositionY + 300;
scoreLabel.AnchorPoint = CCPoint.AnchorMiddleRight;

有人可以帮我吗?

【问题讨论】:

    标签: cocossharp


    【解决方案1】:

    3秒后,1秒后淡出

    scoreLabel.RunActions(new CCDelayTime(3), new CCFadeOut(1));
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-02-27
      • 1970-01-01
      • 1970-01-01
      • 2011-12-30
      • 1970-01-01
      • 2011-02-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多