Пример #1
0
    private void Start()
    {
        Cursor.visible   = false;
        Cursor.lockState = CursorLockMode.Locked;

        motor = GetComponent <MovementMotor>();
    }
 public WaitForBeforeUpdateMovement(MovementMotor motor)
 {
     if (motor == null)
     {
         throw new System.ArgumentNullException("motor");
     }
     _motor = motor;
 }
Пример #3
0
    void Awake()
    {
        if (!_selector)
        {
            _selector = GetComponent <GameObjectSelector>();
        }

        if (!_movementMotor)
        {
            _movementMotor = GetComponent <MovementMotor>();
        }
    }
Пример #4
0
    // Use this for initialization
    void Start()
    {
        if (!character)
        {
            character = transform;
        }

        if (!motor)
        {
            motor = GetComponent <ShooterMovementMotor> ();
        }

        motor.MovementDirection = Vector3.zero;
        motor.FacingDirection   = Vector3.zero;

        avatar = GetComponent <Animator> ();
    }
Пример #5
0
      private MovementMotorParameters GetMovementMotor(MovementMotor motor)
      {
         MovementMotorParameters result = this.topFrontMovementMotor;

         if (MovementMotor.TopFront == motor)
         {
            result = this.topFrontMovementMotor;
         }
         else if (MovementMotor.TopRear == motor)
         {
            result = this.topRearMovementMotor;
         }
         else if (MovementMotor.BottomFront == motor)
         {
            result = this.bottomFrontMovementMotor;
         }
         else // BottomRear
         {
            result = this.bottomRearMovementMotor;
         }

         return (result);
      }
Пример #6
0
 void Awake()
 {
     animator = GetComponent <Animator>();
     motor    = GetComponent <MovementMotor>();
 }
Пример #7
0
 void Start()
 {
     Motor = this.transform.GetComponent<MovementMotor> ();
     firstScan = true;
 }
Пример #8
0
 private void Awake()
 {
     motor = GetComponent <MovementMotor>();
     anim  = GetComponent <Animator>();
 }