コード例 #1
0
ファイル: BarInfo.cs プロジェクト: wtrebella/Grappler
	private void SetupBarInfo(BarInfoType barInfoType) {
		switch (barInfoType) {
		case BarInfoType.Challenge:
			text = "Challenge";
			buttonDelegate = null;
			break;

		case BarInfoType.CoinsToGo:
			text = GameStats.instance.CoinsToGoUntilFreeGift() + " Coins Until Gift";
			buttonDelegate = null;
			break;

		case BarInfoType.Gift:
			text = "Free Gift";
			buttonDelegate = OnButtonPressed_Gift;
			break;

		case BarInfoType.FreeCoinsTimer:
			text = "Free Coins Timer";
			buttonDelegate = null;
			break;

		case BarInfoType.PiggyBank:
			text = "Piggy Bank";
			buttonDelegate = OnButtonPressed_PiggyBank;
			break;

		case BarInfoType.PurchaseItem:
			text = "Purchase Item";
			buttonDelegate = OnButtonPressed_PurchaseItem;
			break;

		case BarInfoType.Rate:
			text = "Rate";
			buttonDelegate = OnButtonPressed_Rate;
			break;

		case BarInfoType.TryItem:
			text = "Try Item";
			buttonDelegate = OnButtonPressed_TryItem;
			break;

		case BarInfoType.WatchAd:
			text = "Watch Ad";
			buttonDelegate = OnButtonPressed_WatchAd;
			break;

		default:
			Debug.LogError("invalid barInfoType: " + barInfoType.ToString());
			break;
		}
	}
コード例 #2
0
ファイル: BarInfo.cs プロジェクト: wtrebella/Grappler
	public BarInfo(BarInfoType barInfoType) {
		this.barInfoType = barInfoType;
		SetupBarInfo(barInfoType);
	}