OnaholeChuBlipDevice.cs 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. using System;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class OnaholeChuBlipDevice : MonoBehaviour
  5. {
  6. public long rawArrowUp { get; private set; }
  7. public long rawArrowDown { get; private set; }
  8. public long rawArrowRight { get; private set; }
  9. public long rawArrowLeft { get; private set; }
  10. public float arrowUp
  11. {
  12. get
  13. {
  14. return (float)this.rawArrowUp * 1.52590219E-05f;
  15. }
  16. }
  17. public float arrowDown
  18. {
  19. get
  20. {
  21. return (float)this.rawArrowDown * 1.52590219E-05f;
  22. }
  23. }
  24. public float arrowRight
  25. {
  26. get
  27. {
  28. return (float)this.rawArrowRight * 1.52590219E-05f;
  29. }
  30. }
  31. public float arrowLeft
  32. {
  33. get
  34. {
  35. return (float)this.rawArrowLeft * 1.52590219E-05f;
  36. }
  37. }
  38. public long rawVertical
  39. {
  40. get
  41. {
  42. return this.rawArrowUp - this.rawArrowDown;
  43. }
  44. }
  45. public long rawHorizontal
  46. {
  47. get
  48. {
  49. return this.rawArrowRight - this.rawArrowLeft;
  50. }
  51. }
  52. public float vertical
  53. {
  54. get
  55. {
  56. return (float)this.rawVertical * 1.52590219E-05f;
  57. }
  58. }
  59. public float horizontal
  60. {
  61. get
  62. {
  63. return (float)this.rawHorizontal * 1.52590219E-05f;
  64. }
  65. }
  66. public Vector2 inputVec
  67. {
  68. get
  69. {
  70. return new Vector2(this.vertical, this.horizontal);
  71. }
  72. }
  73. private Dictionary<string, float> data_dic_ = new Dictionary<string, float>();
  74. private float insertDepth;
  75. private float pistonSpeed;
  76. private float pistonSpeedUpdateTime;
  77. private float calcPistonSpeed;
  78. private float beforeInsertDepth;
  79. private float beforeInsertDir;
  80. private float updateStroke;
  81. private float stroke;
  82. private float pistonSmooth = 0.75f;
  83. private int dir;
  84. private float decisionInsertDepth;
  85. private float testDepth;
  86. private bool buttonA;
  87. private bool buttonB;
  88. private bool buttonC;
  89. private bool beforeButtonA;
  90. private bool beforeButtonB;
  91. private bool beforeButtonC;
  92. public const float RECIPROCAL_ARROW_VALUE = 1.52590219E-05f;
  93. }