123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222 |
- using System;
- using System.Collections.Generic;
- using UnityEngine;
- public class OnaholeChuBlipDevice : MonoBehaviour
- {
- public long rawArrowUp { get; private set; }
- public long rawArrowDown { get; private set; }
- public long rawArrowRight { get; private set; }
- public long rawArrowLeft { get; private set; }
- public long beforeRawArrowUp { get; private set; }
- public long beforeRawArrowDown { get; private set; }
- public long beforeRawArrowRight { get; private set; }
- public long beforeRawArrowLeft { get; private set; }
- public float arrowKeyFierceRate
- {
- get
- {
- return this.m_ArrowKeyFierceRate;
- }
- private set
- {
- this.m_ArrowKeyFierceRate = Mathf.Clamp(value, 0f, 1f);
- }
- }
- public float arrowUp
- {
- get
- {
- return (float)this.rawArrowUp * 1.52590219E-05f;
- }
- }
- public float arrowDown
- {
- get
- {
- return (float)this.rawArrowDown * 1.52590219E-05f;
- }
- }
- public float arrowRight
- {
- get
- {
- return (float)this.rawArrowRight * 1.52590219E-05f;
- }
- }
- public float arrowLeft
- {
- get
- {
- return (float)this.rawArrowLeft * 1.52590219E-05f;
- }
- }
- public long rawVertical
- {
- get
- {
- return this.rawArrowUp - this.rawArrowDown;
- }
- }
- public long rawHorizontal
- {
- get
- {
- return this.rawArrowRight - this.rawArrowLeft;
- }
- }
- public float vertical
- {
- get
- {
- return (float)this.rawVertical * 1.52590219E-05f;
- }
- }
- public float horizontal
- {
- get
- {
- return (float)this.rawHorizontal * 1.52590219E-05f;
- }
- }
- public Vector2 inputVec
- {
- get
- {
- return new Vector2(this.vertical, this.horizontal);
- }
- }
- public float beforeArrowUp
- {
- get
- {
- return (float)this.beforeRawArrowUp * 1.52590219E-05f;
- }
- }
- public float beforeArrowDown
- {
- get
- {
- return (float)this.beforeRawArrowDown * 1.52590219E-05f;
- }
- }
- public float beforeArrowRight
- {
- get
- {
- return (float)this.beforeRawArrowRight * 1.52590219E-05f;
- }
- }
- public float beforeArrowLeft
- {
- get
- {
- return (float)this.beforeRawArrowLeft * 1.52590219E-05f;
- }
- }
- public long beforeRawVertical
- {
- get
- {
- return this.beforeRawArrowUp - this.beforeRawArrowDown;
- }
- }
- public long beforeRawHorizontal
- {
- get
- {
- return this.beforeRawArrowRight - this.beforeRawArrowLeft;
- }
- }
- public float beforeVertical
- {
- get
- {
- return (float)this.beforeRawVertical * 1.52590219E-05f;
- }
- }
- public float beforeHorizontal
- {
- get
- {
- return (float)this.beforeRawHorizontal * 1.52590219E-05f;
- }
- }
- public Vector2 beforeInputVec
- {
- get
- {
- return new Vector2(this.beforeVertical, this.beforeHorizontal);
- }
- }
- private Dictionary<string, float> data_dic_ = new Dictionary<string, float>();
- private float insertDepth;
- private float pistonSpeed;
- private float pistonSpeedUpdateTime;
- private float calcPistonSpeed;
- private float beforeInsertDepth;
- private float beforeInsertDir;
- private float updateStroke;
- private float stroke;
- private float pistonSmooth = 0.75f;
- private int dir;
- private float decisionInsertDepth;
- private float testDepth;
- private bool buttonA;
- private bool buttonB;
- private bool buttonC;
- private bool beforeButtonA;
- private bool beforeButtonB;
- private bool beforeButtonC;
- private float m_ArrowKeyFierceRate;
- public const float RECIPROCAL_ARROW_VALUE = 1.52590219E-05f;
- public static readonly float ArrowThreshold = 0.5f;
- }
|