FightTeamMgr.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. using UnityEngine;
  2. using System.Collections;
  3. public class FightTeamInfo {
  4. public const int FlyPointThreshold = 100;
  5. public const int FlyPointPerHit = 5;
  6. public const float CritFlyPointRate = 4f;
  7. public const float AutoFlyHeight = 0.5f;
  8. #region fields
  9. int mSide; // 0 none ; 1 left ; 2 right
  10. int mFlyPoint; //击飞点数
  11. #endregion
  12. #region properties
  13. public int Side
  14. {
  15. get { return mSide; }
  16. }
  17. public int FlyPoint
  18. {
  19. get {return mFlyPoint;}
  20. set { mFlyPoint = value; }
  21. }
  22. #endregion
  23. public FightTeamInfo(int side) { mSide = side; }
  24. }
  25. public class FightTeamMgr
  26. {
  27. static FightTeamMgr mInstance;
  28. public static FightTeamMgr Instance
  29. {
  30. get
  31. {
  32. if (mInstance == null)
  33. mInstance = new FightTeamMgr();
  34. return mInstance;
  35. }
  36. }
  37. FightTeamInfo leftTeam;
  38. FightTeamInfo rightTeam;
  39. FightTeamMgr()
  40. {
  41. leftTeam = new FightTeamInfo(1);
  42. rightTeam = new FightTeamInfo(2);
  43. }
  44. public FightTeamInfo Left
  45. {
  46. get { return leftTeam; }
  47. }
  48. public FightTeamInfo Right
  49. {
  50. get { return rightTeam; }
  51. }
  52. }