예제 #1
0
        public void Start(CharacterInteface characterInteface, int activityListIndex, Action onActivityEnd)
        {
            Debug.Log("+ Activity.Start " + this);

            OwnerCharacterInteface = characterInteface;
            _OnActivityEnd         = onActivityEnd;

            StartInternal();
            IsInProgress = true;
        }
예제 #2
0
        // ACTIVITIES

        public bool ActivateTarget(InteractableBody target, CharacterInteface characterInterface, int activityListIndex)
        {
            Debug.Log("ActivateTarget " + target);
            if (target)
            {
                return(target.Activate(characterInterface, activityListIndex));
            }

            return(false);
        }
예제 #3
0
        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);
        }
예제 #4
0
        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);
        }
예제 #5
0
        public sealed override bool Activate(CharacterInteface characterInterface, int activityListIndex)
        {
            if (characterInterface == null)
            {
                return(false);
            }

            //Deactivate(activityManager);

            characterInterface.AddActivity(new PickUpActivity(_PickupableItem), activityListIndex);

            return(true);
        }
예제 #6
0
        public void Start(CharacterInteface characterInteface, int activityListIndex)
        {
            if (IsRunning || characterInteface == null)
            {
                return;
            }

            Debug.Log("ActivityList.Start");

            CharacterInteface = characterInteface;
            ActivityListIndex = activityListIndex;
            IsRunning         = true;
            RunNextActivity();
        }
예제 #7
0
 public virtual bool Activate(CharacterInteface characterInterface, int activityListIndex)
 {
     Debug.Log("InteractableBody.Activate: " + _InteractableItem);
     return(_InteractableItem.Activate(characterInterface, activityListIndex));
 }
예제 #8
0
 public bool Activate(CharacterInteface characterInterface, int activityListIndex)
 {
     return(true);
 }