本文整理汇总了C#中CocosSharp.CCLabelTtf.RunAction方法的典型用法代码示例。如果您正苦于以下问题:C# CCLabelTtf.RunAction方法的具体用法?C# CCLabelTtf.RunAction怎么用?C# CCLabelTtf.RunAction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CocosSharp.CCLabelTtf
的用法示例。
在下文中一共展示了CCLabelTtf.RunAction方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ShowBoardMessage
internal void ShowBoardMessage(string theMessage)
{
CCLabelTtf boardMessage = new CCLabelTtf(theMessage, "MarkerFelt", 22);
AddChild(boardMessage, Constants.DepthPointScore);
boardMessage.Color = new CCColor3B(255, 255, 255);
boardMessage.PositionX = screenWidth / 2;
boardMessage.PositionY = screenHeight * .7f;
CCSequence seq = new CCSequence(
new CCScaleTo(2.0f, 2.0f),
new CCFadeTo(1.0f, 0),
new CCCallFuncN(RemoveBoardMessage) //NOTE: CCCallFuncN works, CCCallFunc does not.
);
boardMessage.RunAction(seq);
}
示例2: ShowPointsWithFontLabelForValue
void ShowPointsWithFontLabelForValue(int pointValue, CCPoint positionToShowScore)
{
CCLabelTtf scoreLabel = new CCLabelTtf(string.Format("{0}", pointValue), "MarkerFelt", 22);
AddChild(scoreLabel, Constants.DepthPointScore);
scoreLabel.Color = new CCColor3B(255, 255, 255);
scoreLabel.Position = positionToShowScore;
CCMoveTo moveAction = new CCMoveTo(1.0f, new CCPoint(scoreLabel.Position.X, scoreLabel.Position.Y + 25));
scoreLabel.RunAction(moveAction);
CCSequence seq = new CCSequence(
new CCFadeTo(1.5f, 20),
new CCCallFuncN(RemoveThisLabel));
scoreLabel.RunAction(seq);
}