AiForce.cs 630 B

123456789101112131415161718192021222324252627282930
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using Aitex.Core.Util;
  6. namespace Aitex.Core.RT.Simulator
  7. {
  8. public class AiForce : Singleton<AiForce>
  9. {
  10. public Dictionary<string, float> ForceValues { get; set; }
  11. public AiForce()
  12. {
  13. ForceValues = new Dictionary<string, float>();
  14. }
  15. public void Set(string ai, float value)
  16. {
  17. ForceValues[ai] = value;
  18. }
  19. public void Unset(string ai)
  20. {
  21. if (ForceValues.ContainsKey(ai))
  22. ForceValues.Remove(ai);
  23. }
  24. }
  25. }