当前位置: 首页>>代码示例>>C#>>正文


C# Slot.logConfigError方法代码示例

本文整理汇总了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();
	}
开发者ID:serenitii,项目名称:jeisimple,代码行数:43,代码来源:SlotReel.cs

示例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;
		}
	}
开发者ID:serenitii,项目名称:jeisimple,代码行数:23,代码来源:SlotCredits.cs


注:本文中的Slot.logConfigError方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。