Example #1
0
		public override void OnEnter() {
			if (SteamManager.Initialized) {
				Stat_t[] test = new Stat_t[stats.Length];
				
				for (int i = 0; i < stats.Length; ++i) {
					Debug.Log(stats[i].variableName + " " + stats[i]);
					
					if (stats[i].IsNone) {
						throw new System.Exception("Steam stats must have a variable attached.");
					}
					
					if (stats[i].Type != VariableType.Float && stats[i].Type != VariableType.Int) {
						throw new System.Exception("Steam stats may only be floats and ints: " + stats[i].variableName);
					}
					
					test[i] = new Stat_t(stats[i].variableName, stats[i].RealType);
				}
				
				SteamManager.StatsAndAchievements.InitStats(test);
			}
			
			Finish();
		}
	public void InitStats(Stat_t[] stats) {
		if (m_Stats != null) {
			Debug.LogWarning("Attempted to InitStats twice.");
			return;
		}

		m_Stats = stats;
	}