本文整理汇总了C#中Coin.MoveToSpeedBased方法的典型用法代码示例。如果您正苦于以下问题:C# Coin.MoveToSpeedBased方法的具体用法?C# Coin.MoveToSpeedBased怎么用?C# Coin.MoveToSpeedBased使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Coin
的用法示例。
在下文中一共展示了Coin.MoveToSpeedBased方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Swap
public void Swap(Coin c1, Coin c2)
{
if (Lines[c1.XPos] > 0 || Lines[c2.XPos] > 0)
return;
Vector3 pos1 = c1.transform.localPosition;
Vector3 pos2 = c2.transform.localPosition;
if (TrySwap(c1, c2))
{
ApplySwap(c1, c2);
print("create move coins");
c1.MoveToSpeedBased(pos2, 0, swapSpeed, "");
c2.MoveToSpeedBased(pos1, 0, swapSpeed, "");
}
else
{
c1.MoveToSpeedBased(pos2, 0, swapSpeed, "failSwap");
c2.MoveToSpeedBased(pos1, 0, swapSpeed, "failSwap");
}
}
示例2: OnMoveDone
public void OnMoveDone(Coin coin, string msg)
{
if (coin.State != eCoinState.Idle)
return;
Cell cell = GetCell(coin.PlaceId);
cell.CoinRef = coin;
if (msg == "failSwap")
{
coin.MoveToSpeedBased(coin.GetRealPosition(), 0, swapSpeed, "doneFailSwap");
}
else if (msg != "doneFailSwap" && m_busy == 0)
{
CheckAll(0);
}
}