public void RemoveGoal(GoalKeys goalkeys) { if (!removeGoalList.Contains(goalkeys)) { goalToDo--; goalDone++; removeGoalList.Add(goalkeys); //if (!goalList.Contains(goalString)) //{ // Debug.Log("Delete current Goal"); //goalList.Remove(goalkeys); //} if (notif != null) { notif.NotifQueue.Add(new StringToNotif(LanguageManager.Instance.GetDialog(goalkeys.nameGoalKey), true)); } else { notifSaver = LanguageManager.Instance.GetDialog(goalkeys.nameGoalKey); notifState = true; } } }
void CreateGoal(bool isNewGoal, GoalKeys goal, Transform parent) { GameObject newGoal = Instantiate(goalObject, parent) as GameObject; newGoal.transform.SetParent(parent); newGoal.GetComponent <RectTransform>().localPosition = Vector3.zero; newGoal.name = goalObject.name; newGoal.GetComponent <Goal>().Init(goal.nameGoalKey, goal.descriptionGoalKey); newGoal.GetComponent <Goal>().goalDescriptionTransform = goalDescription; if (!isNewGoal) { newGoal.GetComponent <Goal>().ChangeColor(Color.gray); } }
public void NewGoal(GoalKeys goalkeys) { if (!goalList.Contains(goalkeys)) { goalToDo++; goalList.Add(goalkeys); if (notif != null) { notif.NotifQueue.Add(new StringToNotif(LanguageManager.Instance.GetDialog(goalkeys.nameGoalKey), false)); } else { notifSaver = LanguageManager.Instance.GetDialog(goalkeys.nameGoalKey); notifState = false; } } }