public void AssignMission(decimal userID, DateTime date) { missions record = new missions(); record.attendantID = userID; record.dateT = date; missionEntities.missions.Add(record); missionEntities.SaveChanges(); }
// Use this for initialization void Start() { if (isExist) { Destroy(gameObject); } else { isExist = true; } if (Application.loadedLevel == 0) { if (GameObject.Find("missionsManager") != null) { Mission = GameObject.Find("missionsManager").GetComponent <missions>(); } } monsterLog[0] = PlayerPrefs.GetInt("monsterlog_0"); monsterLog[1] = PlayerPrefs.GetInt("monsterlog_1"); monsterLog[2] = PlayerPrefs.GetInt("monsterlog_2"); monsterLog[3] = PlayerPrefs.GetInt("monsterlog_3"); monsterLog[4] = PlayerPrefs.GetInt("monsterlog_4"); monsterLog[5] = PlayerPrefs.GetInt("monsterlog_5"); monsterLog[6] = PlayerPrefs.GetInt("monsterlog_6"); for (int i = 0; i < monsterLog.Length; i++) { monsterLogBack[i] = monsterLog[i]; } if (Application.loadedLevel == 0) { if (Mission != null) { Mission.questSelect(); } } }