void start() { GetComponent <Interpolate>().Enable(); prev.transform.gameObject.SetActive(false); materis = GamesMateri.load(materiPath); current = 0; lastSaw = -1; last = materis.materis.Count; time = Time.time; next_text.text = "Lanjut"; next.transform.gameObject.SetActive(false); showmateri(current); }
void start() { parent.SetActive(true); prev.transform.gameObject.SetActive(false); materis = GamesMateri.load(materiPath); current = 0; lastSaw = -1; last = materis.materis.Count; time = Time.time; next_text.text = "Lanjut"; next.transform.gameObject.SetActive(false); showmateri(current); }
public static GamesMateri load(string path) { try { TextAsset xmlLoad = Resources.Load("Materi/Data/" + path) as TextAsset; XmlSerializer serializer = new XmlSerializer(typeof(GamesMateri)); StringReader reader = new StringReader(xmlLoad.text); Debug.Log("Load " + path + "success"); return(serializer.Deserialize(reader) as GamesMateri); } catch (Exception e) { Debug.Log("File Materi/Data/" + path + " couldnt be found"); GamesMateri m = new GamesMateri(); return(m); } }