本文整理汇总了C#中Slot.GetBlock方法的典型用法代码示例。如果您正苦于以下问题:C# Slot.GetBlock方法的具体用法?C# Slot.GetBlock怎么用?C# Slot.GetBlock使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Slot
的用法示例。
在下文中一共展示了Slot.GetBlock方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Reshading
// Update shadows at all slots (for example, after the blocks destruction)
public static void Reshading()
{
foreach (SlotGravity sg in GameObject.FindObjectsOfType<SlotGravity>())
sg.shadow = true;
Slot slot;
List<Slot> stock = new List<Slot>();
List<SlotGenerator> generator = new List<SlotGenerator>(GameObject.FindObjectsOfType<SlotGenerator>());
// Gravity shading
foreach (SlotGenerator sgen in generator) {
slot = sgen.slot;
stock.Clear();
while (slot && !slot.GetBlock() && slot.slotGravity.shadow && !stock.Contains(slot)) {
slot.slotGravity.shadow = false;
stock.Add(slot);
slot = slot[slot.slotGravity.gravityDirection];
}
sgen.slot.slotGravity.shadow = false;
}
if (GameObject.FindObjectsOfType<SlotTeleport>().Length > 0) {
// Teleport shading
foreach (SlotGenerator sgen in generator) {
slot = sgen.slot;
stock.Clear();
while (slot && !slot.GetBlock() && !stock.Contains(slot)) {
slot.slotGravity.shadow = false;
stock.Add(slot);
if (slot.slotTeleport)
slot = slot.slotTeleport.target;
else
slot = slot[slot.slotGravity.gravityDirection];
}
sgen.slot.slotGravity.shadow = false;
}
}
//foreach (SlotGravity s in GameObject.FindObjectsOfType<SlotGravity>())
// ScoreBubble.Bubbling(s.shadow ? 1 : 0, s.transform, 0);
//Debug.Break();
}