campfire/Assets/Scripts/CasetteProgress.cs

29 lines
630 B
C#
Raw Normal View History

2020-04-21 01:55:24 +02:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CasetteProgress : MonoBehaviour {
public static int CasetteIndex;
public static int CasetteCount;
public static bool AllCasettesPlayed {
get {
return CasetteIndex >= CasetteCount;
}
}
private void Start() {
CasetteIndex = 0;
CasetteCount = 0;
}
public static int PlayNext() {
if (!AllCasettesPlayed) {
int Index = CasetteIndex;
CasetteIndex++;
return Index;
} else {
return -1;
}
}
}