protected void CreateList(Transform cont) { if (gmtl.CountDaylist() > 0) { ClearContent(cont); int i = gmtl.CountDaylist(); float totalDay = 0; for (int x = 0; x < i; x++) { GameObject button = gmtl.buttonAction; if (gmtl.GetListActionInDay(x).actionType == ModelActions.ActionType.Challenger) { button = GameManagerChallengers.GetInstance().GetButtonChallenger(); } GameObject go = Instantiate <GameObject>(button, cont); go.GetComponent <TimeLineButtons>().RefrashAddList(x); if (inEdit) { go.transform.SetAsFirstSibling(); } else { go.transform.SetAsLastSibling(); } totalDay += gmtl.GetListActionInDay(x).duration; } gmtl.SetTextDayTime(totalDay); } }
private void AddNewDay() { //TODO: Aqui o dia termina e é somado um dia no total; GameManager.GetInstance().TotalDay += 1; GameManagerChallengers.ResetActualChallengerInDay(); gmtl.DayDuration = 0; AnimationManager.GetInstance().SetActionAnimation(ModelActions.ActionType.Sleep); }