IEnumerator Showwarn() { if (butoto) { Movemove.Kemunduran(); Warning.SetActive(true); yield return(new WaitForSeconds(7)); Warning.SetActive(false); } else if (desa) { Safezone.SetActive(true); yield return(new WaitForSeconds(2)); Safezone.SetActive(false); } else if (luarDesa) { diluarDesa.SetActive(true); yield return(new WaitForSeconds(2)); diluarDesa.SetActive(false); } }
public Patient CreatePatient(string name, string surname) { var p = new Patient { Name = name, Surname = surname }; _connection.Insert(p); //Create default safezone (a patient MUST have a safezone) var sz = new Safezone { Base = "sz_empty", Objects = "", Music = "", PatientId = p.Id }; _connection.Insert(sz); return(p); }
// Use this for initialization void Start() { var SZMode = FindObjectOfType <SafezoneMode>(); var builderMode = DefaultModeIsBuilderMode; if (SZMode != null) { builderMode = SZMode.IsBuilderMode; } if (builderMode) { CreateBuilder(); } else { CreateScenarioManager(); } Safezone sz = DataService.Instance.GetPatientSafeZone(GlobalVariables.SelectedPatientId); StartCoroutine(LoadObjects(sz.Objects, builderMode)); StartCoroutine(LoadMusic(sz.Music, builderMode)); }
public void UpdateSafezone(Safezone sz) { _connection.Update(sz); }