public void Start(CharacterInteface characterInteface, int activityListIndex, Action onActivityEnd) { Debug.Log("+ Activity.Start " + this); OwnerCharacterInteface = characterInteface; _OnActivityEnd = onActivityEnd; StartInternal(); IsInProgress = true; }
// ACTIVITIES public bool ActivateTarget(InteractableBody target, CharacterInteface characterInterface, int activityListIndex) { Debug.Log("ActivateTarget " + target); if (target) { return(target.Activate(characterInterface, activityListIndex)); } return(false); }
public void AddActivityList(ActivityList activityList, CharacterInteface characterInteface) { if (activityList == null) { return; // TODO: or empty? } Debug.Log("ActivityManager: AddActivityList"); int activityListIndex = _ActivityLists.Count; _ActivityLists.Add(activityList); activityList.Start(characterInteface, activityListIndex); }
protected void Start() { _StateBehaviors[(int)State.Idle] = IdleBehavior; _StateBehaviors[(int)State.Walk] = WalkBehavior; _StateBehaviors[(int)State.Run] = RunBehavior; _StateBehaviors[(int)State.Sit] = SitBehavior; // SETUP FEELINGS _FeelingManager = new FeelingManager(StartingFeelings); // SETUP CharacterInteface = new CharacterInteface(this); }
public sealed override bool Activate(CharacterInteface characterInterface, int activityListIndex) { if (characterInterface == null) { return(false); } //Deactivate(activityManager); characterInterface.AddActivity(new PickUpActivity(_PickupableItem), activityListIndex); return(true); }
public void Start(CharacterInteface characterInteface, int activityListIndex) { if (IsRunning || characterInteface == null) { return; } Debug.Log("ActivityList.Start"); CharacterInteface = characterInteface; ActivityListIndex = activityListIndex; IsRunning = true; RunNextActivity(); }
public virtual bool Activate(CharacterInteface characterInterface, int activityListIndex) { Debug.Log("InteractableBody.Activate: " + _InteractableItem); return(_InteractableItem.Activate(characterInterface, activityListIndex)); }
public bool Activate(CharacterInteface characterInterface, int activityListIndex) { return(true); }