public override bool CanActivate(MobUpdateContext context) { MobAIPerceptionState perception = context.mob.AIState.perception_data; EntityProp prop = perception.GetPlayerTargetProp(); bool canActivate = (prop != null && prop.propStatus == EntityProp.ePropStatus.orphaned); return(canActivate); }
public override void Perform(MobUpdateContext context) { MobAIPerceptionState perception = context.mob.AIState.perception_data; EntityProp prop = perception.GetPlayerTargetProp(); if (prop.distance >= WorldConstants.ROOM_TILE_SIZE) { context.MobPostDialog("I though I saw someone over here"); context.MoveMob(prop.GetPosition()); } }
public MobAIState(MobSpawner spawner) { behavior_data = new MobAIBehaviorState(spawner); perception_data = new MobAIPerceptionState(); }
public MobAIState() { behavior_data = new MobAIBehaviorState(); perception_data = new MobAIPerceptionState(); }