本文整理匯總了C#中Bag.AddDomino方法的典型用法代碼示例。如果您正苦於以下問題:C# Bag.AddDomino方法的具體用法?C# Bag.AddDomino怎麽用?C# Bag.AddDomino使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Bag
的用法示例。
在下文中一共展示了Bag.AddDomino方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Start
void Start()
{
GameEventManager.Initialize();
mBags = new List<Bag>(2);
mBoard = mBoardObject.GetComponent<Board>();
mBoard.Initialize(kBoardSize);
// Init shared game data.
BoardController boardController = mBoard.Controller;
Debug.Log("board controller " + boardController.ToString());
DominoGenerator generator = new DominoGenerator(boardController.StartPosition, mDominoObject);
Debug.Log("board controller" + generator.ToString());
GamePlayManager.Initialize();
GamePlayManager.Instance.Init(generator, mBoard.Controller, mDominoObject);
// init draw bags
{
Bag bag = new Bag(kNumSlots, mBoard.Controller.Size, true);
for (int i = 0; i < kNumSlots; i++)
{
Domino d = GamePlayManager.Instance.GetNextDomino();
d.EnableGraphics(mBoard.Controller.Size);
bag.AddDomino(d);
}
mBags.Add(bag);
}
{
Bag bag = new Bag(kNumSlots, mBoard.Controller.Size, false);
for (int i = 0; i < kNumSlots; i++)
{
Domino d = GamePlayManager.Instance.GetNextDomino();
d.EnableGraphics(mBoard.Controller.Size);
d.UpdateDominoLocation(mBoard.Controller.Size);
bag.AddDomino(d);
}
mBags.Add(bag);
}
ActiveDomino = GamePlayManager.Instance.GetNextDomino().GetComponent<Domino>();
if (mActiveDomino != null) {
mActiveDomino.MakeActive();
}
mDominos.Add(ActiveDomino);
ActiveDomino.EnableGraphics(mBoard.Controller.Size);
ActiveDomino.SetHighlight(HighLightMode.Active);
}