public void NewUserEvent(userEvent ev, object param) { switch (ev) { case userEvent.NOTEFAIL: grades.DisplayFail(); break; case userEvent.NOTEBAD: grades.DisplayBad(); break; case userEvent.NOTEGOOD: grades.DisplayGood(); break; case userEvent.NOTENORMAL: grades.DisplayNormal(); break; case userEvent.NOTEVERYGOOD: grades.DisplayVeryGood(); break; } }
public void SendEvent(userEvent ev, Object param) { foreach (EventRecievers eventReceiv in _eventReceiverList) { if (eventReceiv.userEvents == true) { eventReceiv.recv.NewUserEvent(ev, param); } } }
public void NewUserEvent(userEvent ev, Object param) { if (ev == userEvent.NOTEPRESSED) { NoteEventParameter p = (NoteEventParameter)param; tiles[p.note].Press(); } else if (ev == userEvent.NOTERELEASED) { //NoteEventParameter p = (NoteEventParameter)param; //tiles[p.note].NoteReleased(); } else { throw new NotImplementedException(); } }
public static void userEventRecord(int userlogin, int userEventNum, FUENMLEntities db) { try { if (userEventNum == 1 || userEventNum == 2 || userEventNum == 3) { if (userlogin == 0) { userlogin = 2; } userEvent userEventobj = new userEvent(); userEventobj.user_id = userlogin; userEventobj.userEvent1 = userEventNum; userEventobj.created = DateTime.Now; db.userEvents.Add(userEventobj); db.SaveChanges(); } } catch (Exception ex) { Debug.WriteLine(ex); } }
// Use this for initialization void Start() { Debug.Log(Application.persistentDataPath); textControl = GameObject.Find("GameController").GetComponent <TextControl> (); movScript = GameObject.Find("GameController").GetComponent <movementScript> (); ue = GameObject.Find("GameController").GetComponent <userEvent> (); ue.loadEvents(); timeOfDayTimer = GameObject.Instantiate(GameObject.Find("TimerObject").GetComponent <Timer>()) as Timer; //timeOfDayTimer = GameObject.Find ("TimerObject").GetComponent<Timer>(); timeOfDay = 0; timeOfDayTimer.startTimer(10f); weatherTimer = GameObject.Instantiate(GameObject.Find("TimerObject").GetComponent <Timer>()) as Timer; //weatherTimer = GameObject.Find ("TimerObject").GetComponent<Timer>(); weatherTimer.startTimer(10f); brightnessTimer = GameObject.Instantiate(GameObject.Find("TimerObject").GetComponent <Timer>()) as Timer; //brightnessTimer = GameObject.Find ("TimerObject").GetComponent<Timer>(); brightnessTimer.startTimer(1f); fireTimer = GameObject.Instantiate(GameObject.Find("TimerObject").GetComponent <Timer>()) as Timer; //fireTimer = GameObject.Find ("TimerObject").GetComponent<Timer>(); fireTimer.startTimer(1f); randomEventTimer = GameObject.Instantiate(GameObject.Find("TimerObject").GetComponent <Timer>()) as Timer; //randomEventTimer = GameObject.Find ("timerObj").GetComponent<Timer>(); randomEventTimer.startTimer(1f); //eventList = new List<Events>(); hungerTimer = GameObject.Instantiate(GameObject.Find("TimerObject").GetComponent <Timer>()) as Timer; rangeVariables = new Dictionary <string, float> (); stateVariables = new Dictionary <string, string> (); boolVariables = new Dictionary <string, bool>(); //range variables rangeVariables.Add("brightness", brightness); rangeVariables.Add("humidity", humidity); rangeVariables.Add("timeofday", timeOfDay); rangeVariables.Add("fireenergy", fireEnergy); rangeVariables.Add("hunger", hunger); rangeVariables.Add("warmth", warmth); rangeVariables.Add("logs", logs); rangeVariables.Add("food", food); rangeVariables.Add("steps", stepsTaken); rangeVariables.Add("whichLineLogs", 0f); //stateVariables stateVariables.Add("statehumidity", stateHumidity); stateVariables.Add("statefire", stateFire); stateVariables.Add("statetime", stateTime); stateVariables.Add("statelight", stateLight); stateVariables.Add("inrangefire", "true"); //bool variables boolVariables.Add("inRangeFireB", true); //are we in range for fire effects? boolVariables.Add("onceADay", true); //happens only once a day humidity boolVariables.Add("onlyOnceFire", false); boolVariables.Add("flickerOnce", false); boolVariables.Add("firstTimeLogs", false); boolVariables.Add("hasArrivedLogs", false); boolVariables.Add("shouldArrive", false); boolVariables.Add("firstTimeFood", true); SaveFile.current = new SaveFile(); savefilename = "Reset"; save(); savefilename = ""; SaveLoad.LoadAforismer(); aforismer = SaveLoad.aforismerSave; }
public void NewUserEvent(userEvent ev, object param) { // throw new NotImplementedException(); }
public void SendEvent(userEvent ev, Object param) { foreach (EventRecievers eventReceiv in _eventReceiverList) { if (eventReceiv.userEvents == true) eventReceiv.recv.NewUserEvent(ev, param); } }
public void NewUserEvent(userEvent ev, object param) { switch (ev) { case userEvent.NOTEFAIL: grades.DisplayFail(); break; case userEvent.NOTEBAD: grades.DisplayBad(); break; case userEvent.NOTEGOOD: grades.DisplayGood(); break; case userEvent.NOTENORMAL: grades.DisplayNormal(); break; case userEvent.NOTEVERYGOOD: grades.DisplayVeryGood(); break; } }
public void NewUserEvent(userEvent ev, object param) { }
public void NewUserEvent(userEvent ev, object param) { }
public void NewUserEvent(userEvent ev, Object param) { if (ev == userEvent.NOTEPRESSED) { NoteEventParameter p = (NoteEventParameter)param; tiles[p.note].Press(); } else if (ev == userEvent.NOTERELEASED) { //NoteEventParameter p = (NoteEventParameter)param; //tiles[p.note].NoteReleased(); } else throw new NotImplementedException(); }
public void NewUserEvent(userEvent ev, object param) { throw new NotImplementedException(); }