Esempio n. 1
0
    /// <summary>
    /// 把仇恨值最高的角色设置为目标角色
    /// </summary>
    /// <returns></returns>
    public BehaviourReturnCode ActionSetMostHateActorToTarget()
    {
        RunningProperty.TargetActor = RunningProperty.AI.Ambient.GetMostHateActor();

        if (RunningProperty.TargetActor == null)
        {
            return(BehaviourReturnCode.Failure);
        }

        RunningProperty.RefreshState();

        return(BehaviourReturnCode.Success);
    }
Esempio n. 2
0
    public override void Active()
    {
        // Temp Test
        //UnityEngine.Time.timeScale = 0.1f;

        //mRunningProperty.TargetActor = GetDefaultTargetActor();

        mRunningProperty.RefreshState();
        mFunction.RunningProperty = mRunningProperty;


        mCurrentBehaviourTree = GetBehaviourTree();

        if (mCurrentBehaviourTree != null)
        {
            mCurrentBehaviourTree.Run();
        }

        ActiveImplement();
        mPathWalker.Update();
        mAmbient.Update();

        mMachine.Update();
    }