示例#1
0
    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;
            }
        }
    }
示例#2
0
    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);
        }
    }
示例#3
0
 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;
         }
     }
 }