protected override void OnEnter(NodeData wData) { EntityWorkData workData = wData as EntityWorkData; MapSensorData mapSensor = ECSLayerLocate.Info.GetWorldInfo <MapSensorData>(WorldInfoKey.MapInfo); //发送请求 ParamData paramData = workData.GetReqParam(EntityReqId.EnemySeekPlayer); paramData.SetVect2Int(mapSensor.PlayerMapPos); ECSLayerLocate.Request.PushEntityRequest(workData.MEntity.GetHashCode(), EntityReqId.EnemySeekPlayer); }
protected override void OnEnter(NodeData wData) { EntityWorkData workData = wData as EntityWorkData; EnemyCom seekPathCom = workData.MEntity.GetCom <EnemyCom>(); Vector2Int targrtPos = Vector2Int.zero; if (seekPathCom.WanderPath[seekPathCom.WanderIndex] == null) { targrtPos = seekPathCom.SpawnPos; } else { targrtPos = seekPathCom.WanderPath[seekPathCom.WanderIndex]; } //发送请求 ParamData paramData = workData.GetReqParam(EntityReqId.EnemyWander); paramData.SetVect2Int(targrtPos); ECSLayerLocate.Request.PushEntityRequest(workData.MEntity.GetHashCode(), EntityReqId.EnemyWander); }