public override float GetGoalChange(Goal goal) { var change = base.GetGoalChange(goal); if (goal.Name == AutonomousCharacter.REST_GOAL) change -= 0.1f; if (goal.Name == AutonomousCharacter.EAT_GOAL) change += 0.1f; return change; }
public virtual float GetGoalChange(Goal goal) { if (this.GoalEffects.ContainsKey(goal)) { return this.GoalEffects[goal]; } else return 0.0f; }
public override float GetGoalChange(Goal goal) { var change = base.GetGoalChange(goal); if (goal.Name == AutonomousCharacter.EAT_GOAL) { change -= 2.0f; } else if (goal.Name == AutonomousCharacter.REST_GOAL) { change += 0.5f; } else if (goal.Name == AutonomousCharacter.SURVIVE_GOAL) { change += 2.0f; } return change; }
public void AddEffect(Goal goal, float goalChange) { this.GoalEffects[goal] = goalChange; }
public override float GetGoalChange(Goal goal) { if (goal.Name == AutonomousCharacter.REST_GOAL) { var distance = (this.Target.transform.position - this.Character.Character.KinematicData.position).magnitude; //+0.01 * distance because of the walk return distance * 0.01f; } if (goal.Name == AutonomousCharacter.EAT_GOAL) { var distance = (this.Target.transform.position - this.Character.Character.KinematicData.position).magnitude; //+0.01 * distance because of the walk return distance * 0.1f; } else return 0; }
public override float GetGoalChange(Goal goal) { var change = base.GetGoalChange(goal); if (goal.Name == AutonomousCharacter.CONQUER_GOAL) change -= 2.0f; return change; }