示例#1
0
 public GravityCalculator3D(IGroundingDetector3D gDetector)
 {
     this.detector = gDetector;
     FloatingTime  = 0.00f;
     GravityAccel  = 10.00f;     // 標準重力加速度(1G)はおよそ 9.8 m/s2  (加速度の単位であることに注意。1秒につき速度が 9.8m/s速くなるような加速をあらわす。)
     MaximumSpeed  = 100f;
 }
示例#2
0
        private void Start()
        {
            character  = GetComponent <CharacterController>();
            detector   = GetComponent <IGroundingDetector3D>();
            cameraman  = new CameraAngleCalculator3D(face, this.gameObject, VirtualStickR);
            frictioner = new AdoptiveFriction(this.gameObject, detector);

            // 移動量を計算するクラスをそれぞれここで登録する。
            calculators = new List <IMovementCalculator3D>();
            calculators.Add(new GravityCalculator3D(detector));
            calculators.Add(new WalkCalculator3D(this.gameObject, VirtualStickL));
        }
示例#3
0
 public AdoptiveFriction(GameObject athleteObject, IGroundingDetector3D gDetector)
 {
     this.athlete       = athleteObject;
     this.detector      = gDetector;
     this.defaultParent = null;      // transform.parent == null だと親を持たないオブジェクトになる?
 }