/// <summary> /// Initializes a new instance of the <see cref="Assignment"/> class. /// </summary> public Assignment(Task.Task task, WorkCalendarBase workCalendar, AbstractContour contourBucket, double units, long delay) { _task = task; _contourBucket = contourBucket; _units = units; _workingCalendar = workCalendar; _delay = new DelayImpl(delay); }
private void CaseAttackStateDelay() { IDelayable skill = skillFocused as IDelayable; Hashtable action = new Hashtable(); if (skill.IsDelayCompleted() || skill.IsDelayExempted) { SetAttackState(AttackState.none); } else { skill.Delay(action); } }
public SingleEntityResult OfferSingleEntitySelection(ICollection <Entity> options) { SingleEntityResult result = new SingleEntityResult(); SingleEntitySelection ses = Instantiate(singleEntityPromptPrefab); ses.Initialize(this, options, result); ses.transform.parent = transform; activeSelection = ses; pendingResult = result; state = InterfaceState.BusyWithSelection; return(result); }
/// <summary> /// Moves the <see cref="CardRenderer"/> that matches the active card back into the hand. /// </summary> /// <remarks>Used to respond to <see cref="GameManager.OnCardDeselected"/></remarks> public void DeselectActiveCard() { if (activeCardRenderer != null) { hand.AddCardToHand(activeCardRenderer); hand.HoldCardsDown = false; activeCardRenderer.UpdateDescription(useStatic: true); activeCardRenderer = null; cancelCardButton.gameObject.SetActive(false); } if (state == InterfaceState.BusyWithSelection) { pendingResult = null; activeSelection.Cleanup(); activeSelection = null; state = InterfaceState.Idle; } }
public void Update() { switch (state) { case InterfaceState.BusyWithSelection: { if (pendingResult.IsReadyOrCancelled()) { pendingResult = null; activeSelection.Cleanup(); activeSelection = null; state = InterfaceState.Idle; } }; break; } if (activeCardRenderer != null) { activeCardRenderer.UpdateDescription(); //ABSOLUTELY DON'T DO THIS EVERY TURN } }
public void PrintDetail() { StringBuilder sb = new StringBuilder(); sb.Append("\n=======================\n "); sb.Append(this.ToString()); sb.Append("\n=======================\n"); sb.Append("\nSkill focused : "); if (skillFocused != null) { sb.Append(skillFocused.skillCode); } sb.Append("\nAttack state : "); sb.Append(attackState); sb.Append("\nMove state : "); sb.Append(moveState); for (int i = 0; i < skillList.Count; i++) { sb.Append("\n--Skill"); sb.Append(i); sb.Append("--"); sb.Append("\nSkill name : "); sb.Append(skillList[i].skillCode); sb.Append("\nSkill Cooldown : "); ICooldownable cSkill = skillList[i] as ICooldownable; if (cSkill != null) { sb.Append(cSkill.CooldownTime + "/" + cSkill.CooldownTimeNeeded); if (cSkill.IsSkillReadyExceptCooldown()) { sb.Append(": Skill Ready Except Cooldown"); } } else { sb.Append("Not Cooldownable"); } sb.Append("\nSkill Ready : "); IReadiable rSkill = skillList[i] as IReadiable; if (rSkill != null) { sb.Append(rSkill.ReadyTime + "/" + rSkill.ReadyTimeNeeded); } else { sb.Append("Not Readiable"); } sb.Append("\nSkill Delay : "); IDelayable dSkill = skillList[i] as IDelayable; if (dSkill != null) { sb.Append(dSkill.DelayTime + "/" + dSkill.DelayTimeNeeded); } else { sb.Append("Not Delayable"); } } sb.Append("\n======================="); Console.WriteLine(sb); }