protected override void OnExit(NodeData wData, int runningStatus) { GazeSurroundData context = GetContext <GazeSurroundData>(wData); context.Timer = 0; EntityWorkData workData = wData as EntityWorkData; workData.ChangeRequestId(LCECS.RequestId.None); }
protected override int OnRunning(NodeData wData) { GazeSurroundData context = GetContext <GazeSurroundData>(wData); if (NodeTime.TotalTime - context.Timer > gazeTimer) { return(NodeState.FINISHED); } return(NodeState.EXECUTING); }
protected override void OnEnter(NodeData wData) { if (!wData.Blackboard.ContainsKey(DEC_PRE_CheckEnemyInAttackRange.EnemyInAttackRangeKey)) { return; } GazeSurroundData context = GetContext <GazeSurroundData>(wData); context.Timer = NodeTime.TotalTime; int followEntityUid = (int)wData.Blackboard[DEC_PRE_CheckEnemyInAttackRange.EnemyInAttackRangeKey]; paramData.SetInt(followEntityUid); paramData.SetVect2(gazeRange); EntityWorkData workData = wData as EntityWorkData; LCECS.ECSLayerLocate.Request.PushRequest(workData.MEntity.GetHashCode(), LCECS.RequestId.GazeSurround, paramData); }