本文整理汇总了C#中Info.TempSave方法的典型用法代码示例。如果您正苦于以下问题:C# Info.TempSave方法的具体用法?C# Info.TempSave怎么用?C# Info.TempSave使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Info
的用法示例。
在下文中一共展示了Info.TempSave方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UseGrimReaper
/// <summary>
/// Uses the Grim Reaper ability by moving the player's Grim Reaper piece to its new tile.
/// </summary>
public void UseGrimReaper( Piece p, Tile t, Info info )
{
//Store piece color
Color c = p.sprite.color;
//Animate grim reaper
Sequence s = DOTween.Sequence ( )
.Append ( p.currentTile.sprite.DOColor ( Color.black, ANIMATE_TIME ).SetLoops ( 2, LoopType.Yoyo ) )
.Insert ( 0, p.sprite.DOColor ( Color.black, ANIMATE_TIME ) )
.Insert ( ANIMATE_TIME, p.sprite.DOFade ( 0, 0 ) )
.AppendCallback ( () =>
{
//Move the player's Grim Reaper piece
p.currentTile.currentPiece = null;
p.currentTile = t;
t.currentPiece = p;
p.Move ( t.transform.position );
} )
.Append ( t.sprite.DOColor ( Color.black, ANIMATE_TIME ).SetLoops ( 2, LoopType.Yoyo ) )
.Insert ( ANIMATE_TIME * 3, p.sprite.DOFade ( 1, 0 ) )
.Insert ( ANIMATE_TIME * 3, p.sprite.DOColor ( c, ANIMATE_TIME ) )
.OnComplete ( () =>
{
//Reset grim reaper tile
info.grimReaperTile = null;
//Hide prompt
info.currentPlayer.prompt.gameObject.SetActive ( false );
//Store temporary save data
info.TempSave ( );
//Reset board
info.ResetBoardColor ( );
//Highlight pieces
info.HighlightCurrentPlayerPieces ( );
} );
}