本文整理汇总了C#中Slot.logConfigError方法的典型用法代码示例。如果您正苦于以下问题:C# Slot.logConfigError方法的具体用法?C# Slot.logConfigError怎么用?C# Slot.logConfigError使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Slot
的用法示例。
在下文中一共展示了Slot.logConfigError方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnEnable
void OnEnable()
{
slot = transform.parent.gameObject.GetComponent<Slot>();
if (slot.symbolPrefabs.Count == 0)
{
slot.logConfigError(SlotErrors.NO_SYMBOLS);
return;
}
cacheSymbolFrequency();
if (slot.symbolPrefabs[0] == null) return;
GameObject symb = (GameObject)Instantiate(slot.symbolPrefabs[0]);
symb.transform.localScale = Vector3.Scale(symb.transform.localScale, transform.parent.transform.localScale);
//symb.transform.localRotation = transform.parent.transform.rotation;
if (symb.GetComponent<SpriteRenderer>())
{
Vector3 size = symb.GetComponent<SpriteRenderer>().sprite.bounds.size;
symbolHeight = size.y * symb.transform.localScale.y;
symbolWidth = size.x * symb.transform.localScale.x;
} else
if (symb.GetComponent<MeshFilter>())
{
symbolHeight = symb.GetComponent<MeshFilter>().mesh.bounds.size.y * slot.transform.localScale.y;
symbolWidth = symb.GetComponent<MeshFilter>().mesh.bounds.size.x * slot.transform.localScale.y;
} else {
slot.logConfigError(SlotErrors.MISSING_RENDERER);
return;
}
reelPadding = symbolWidth * (slot.horizontalReelPaddingPercent / 100.0f);
symbolPadding = symbolHeight * (slot.verticalSymbolPaddingPercent / 100.0f);
heightOffset = -transform.parent.transform.position.y + (symbolHeight * (slot.reelHeight / 2) + (symbolPadding * (slot.reelHeight / 2)));
widthOffset = -transform.parent.transform.position.x + (symbolWidth * (slot.numberOfReels / 2) + (reelPadding * (slot.numberOfReels / 2)));
Destroy (symb);
createReelSymbols();
}
示例2: restore
public void restore()
{
slot = GetComponent<Slot>();
if (persistant)
{
slot.log ("restoring slot settings");
credits = PlayerPrefs.GetInt(slot.name + "_credits", credits);
betPerLineIndex = PlayerPrefs.GetInt(slot.name + "_betPerLineIndex", betPerLineIndex);
betPerLine = slot.betsPerLine[betPerLineIndex].value; //PlayerPrefs.GetInt(slot.name + "_betPerLine", betPerLine);
linesPlayed = PlayerPrefs.GetInt(slot.name + "_linesPlayed", linesPlayed);
for (int index = 0; index < slot.betsPerLine.Count; index++)
{
slot.betsPerLine[index].canBet = PlayerPrefsX.GetBool(slot.name + "_betsPerLine" + index, slot.betsPerLine[index].canBet);
}
if (linesPlayed > slot.lines.Count) linesPlayed = slot.lines.Count;
//if (betPerLine > maxBetPerLine) betPerLine = maxBetPerLine;
} else {
if (betPerLineDefaultIndex > slot.betsPerLine.Count) { slot.logConfigError("Your machine default bet per line index is greater than the actual bets per line"); return; }
betPerLine = slot.betsPerLine[betPerLineDefaultIndex].value;
betPerLineIndex = betPerLineDefaultIndex;
}
}