private void UpdateTargets() { // Compute a target based on the most salient prop enemyTargetPropIndex = MobAIPerceptionState.RefreshSalienceTarget(player_props); friendlyTargetPropIndex = MobAIPerceptionState.RefreshSalienceTarget(ai_props); energyTankTargetPropIndex = MobAIPerceptionState.RefreshSalienceTarget(energy_tank_props); }
private void PropsUpdateStatus( MobUpdateContext context) { Mob ownerMob = context.mob; player_props.ForEach(prop => MobAIPerceptionState.UpdatePropStatus(ownerMob, prop)); ai_props.ForEach(prop => MobAIPerceptionState.UpdatePropStatus(ownerMob, prop)); energy_tank_props.ForEach(prop => MobAIPerceptionState.UpdatePropStatus(ownerMob, prop)); }
// -- Top Level Update Functions -- private void PropListsRefresh( MobUpdateContext context) { // Create props for any Entity that we don't already have a prop for. // Remove props for any Entity that no longer exists. player_props = MobAIPerceptionState.PropListsRefresh(context.mob, context.moveRequest.Players, player_props); ai_props = MobAIPerceptionState.PropListsRefresh(context.mob, context.otherMobs, ai_props); energy_tank_props = MobAIPerceptionState.PropListsRefresh(context.mob, context.moveRequest.EnergyTanks, energy_tank_props); }
private void PropsUpdateSalience( MobUpdateContext context) { Mob ownerMob = context.mob; // Compute a salience score for all props player_props.ForEach(prop => prop.salience = MobAIPerceptionState.ComputePropSalience(PlayerPropEvaluators, ownerMob, prop)); ai_props.ForEach(prop => prop.salience = MobAIPerceptionState.ComputePropSalience(AIPropEvaluators, ownerMob, prop)); energy_tank_props.ForEach(prop => prop.salience = MobAIPerceptionState.ComputePropSalience(EnergyTankPropEvaluators, ownerMob, prop)); }
public MobAIState(MobSpawner spawner) { behavior_data = new MobAIBehaviorState(spawner); perception_data = new MobAIPerceptionState(); }
public MobAIState() { behavior_data = new MobAIBehaviorState(); perception_data = new MobAIPerceptionState(); }