コード例 #1
0
ファイル: Action.cs プロジェクト: IAJ-g04/Lab6
 public virtual float GetGoalChange(Goal goal)
 {
     if (this.Effects.ContainsKey(goal))
     {
         return this.Effects[goal];
     }
     else return 0.0f;
 }
コード例 #2
0
        public override float GetGoalChange(Goal goal)
        {
            var change = base.GetGoalChange (goal);

            if (goal.Name == AutonomousCharacter.GET_RICH_GOAL) {
                change -= 5.0f; //is this what we want?
            }

            return change;
        }
コード例 #3
0
 public override float GetGoalChange(Goal goal)
 {
     if (goal.Name == AutonomousCharacter.REST_GOAL)
     {
         var distance = (this.Target.transform.position - this.Character.Character.KinematicData.position).magnitude - ActionDistance;
         if (distance > 0)
             return distance * 0.01f;
         return 0;
     }
     return 0;
 }
コード例 #4
0
ファイル: Shoot.cs プロジェクト: RicardoEPRodrigues/IAJ-Labs
        public override float GetGoalChange(Goal goal)
        {
            var change = base.GetGoalChange(goal);

            if (goal.Name == AutonomousCharacter.EAT_GOAL)
            {
                change -= 2.0f;
            }

            return change;
        }
コード例 #5
0
ファイル: PickUpChest.cs プロジェクト: IAJ-g04/Lab6
 public override float GetGoalChange(Goal goal)
 {
     if (goal.Name == AutonomousCharacter.GET_RICH_GOAL) return -0.5f;
     else if (goal.Name == AutonomousCharacter.REST_GOAL)
     {
         var distance =
             (this.Target.transform.position - this.Character.Character.KinematicData.position).magnitude;
         //0.5 for the attack action and +0.01 * distance because of the walk
         return distance * 0.01f;
     }
     return 0.0f;
 }
コード例 #6
0
ファイル: PickUpChest.cs プロジェクト: hugosednax/IAJProj3
        public override float GetGoalChange(Goal goal)
        {
            var change = base.GetGoalChange(goal);
            if (goal.Name == AutonomousCharacter.EAT_GOAL) return +1.0f;
            else if (goal.Name == AutonomousCharacter.REST_GOAL)
            {
                var distance =
                    (this.Target.transform.position - this.Character.Character.KinematicData.position).magnitude;
                //0.5 for the attack action and +0.01 * distance because of the walk
                return 0.5f + distance * 0.01f;
            }
            else if (goal.Name == AutonomousCharacter.SURVIVE_GOAL) return 0.0f;

            return 0;
        }
コード例 #7
0
ファイル: Shoot.cs プロジェクト: RicardoEPRodrigues/IAJ-Labs
        public override float GetGoalChange(Goal goal)
        {
            if (goal.Name == AutonomousCharacter.EAT_GOAL)
                return -2.0f;
            else if (goal.Name == AutonomousCharacter.REST_GOAL)
            {
                var distance = (this.Target.transform.position - this.Character.Character.KinematicData.position).magnitude - ActionDistance;
                //+0.01 * distance because of the walk
                if (distance > 0)
                    return distance * 0.01f;
                return 0;
            }
            else if (goal.Name == AutonomousCharacter.SURVIVE_GOAL)
                return +2.0f;

            return 0;
        }
コード例 #8
0
 public override float GetGoalChange(Goal goal)
 {
     var change = base.GetGoalChange(goal);
     return change;
 }
コード例 #9
0
 public override float GetGoalChange(Goal goal)
 {
     if (goal.Name == AutonomousCharacter.CONQUER_GOAL)
     {
         return  -2.0f;
     }
     else if (goal.Name == AutonomousCharacter.REST_GOAL)
     {
         var distance =
             (this.Character.BestFlagPosition - this.Character.Character.KinematicData.position).magnitude;
         //+0.01 * distance because of the walk
         return distance * 0.01f;
     }
     else
         return 0;
 }
コード例 #10
0
ファイル: Action.cs プロジェクト: IAJ-g04/Lab6
 public void AddEffect(Goal goal, float goalChange)
 {
     this.Effects[goal] = goalChange;
 }
コード例 #11
0
 public void AddEffect(Goal goal, float goalChange)
 {
     this.GoalEffects[goal] = goalChange;
 }
コード例 #12
0
        public override float GetGoalChange(Goal goal)
        {
            var change = base.GetGoalChange(goal);

            if (goal.Name == AutonomousCharacter.REST_GOAL)
            {
                change +=
                    (this.Character.BestFlagPosition - this.Character.Character.KinematicData.position).magnitude;
                //+0.01 * distance because of the walk
                return change * 0.01f;
            }
            else if (goal.Name == AutonomousCharacter.CONQUER_GOAL)
            {
                change -= 2.0f;
            }

            return change;
        }
コード例 #13
0
 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;
     }
     else return 0;
 }
コード例 #14
0
ファイル: Rest.cs プロジェクト: IAJ-g04/Lab8
 public override float GetGoalChange(Goal goal)
 {
     var change = base.GetGoalChange(goal);
     if (goal.Name == AutonomousCharacter.REST_GOAL) change -= 0.1f;
     return change;
 }
コード例 #15
0
ファイル: PlaceFlag.cs プロジェクト: hugosednax/IAJProj3
 public override float GetGoalChange(Goal goal)
 {
     var change = base.GetGoalChange(goal);
     if (goal.Name == AutonomousCharacter.CONQUER_GOAL) return - 2f;
     else if (goal.Name == AutonomousCharacter.EAT_GOAL) return +1f;
     return change;
 }
コード例 #16
0
ファイル: Rest.cs プロジェクト: RicardoEPRodrigues/IAJ-Labs
 public override float GetGoalChange(Goal goal)
 {
     if (goal.Name == AutonomousCharacter.REST_GOAL) return -0.1f;
     return 0.0f;
 }
コード例 #17
0
ファイル: Sleep.cs プロジェクト: IAJ-g04/Lab6
 public override float GetGoalChange(Goal goal)
 {
     //TODO implement
     throw new NotImplementedException();
 }