Exemple #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;
 }
Exemple #3
0
    void Awake()
    {
        if (!_selector)
        {
            _selector = GetComponent <GameObjectSelector>();
        }

        if (!_movementMotor)
        {
            _movementMotor = GetComponent <MovementMotor>();
        }
    }
    // 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> ();
    }
Exemple #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);
      }
 void Awake()
 {
     animator = GetComponent <Animator>();
     motor    = GetComponent <MovementMotor>();
 }
Exemple #7
0
 void Start()
 {
     Motor = this.transform.GetComponent<MovementMotor> ();
     firstScan = true;
 }
Exemple #8
0
 private void Awake()
 {
     motor = GetComponent <MovementMotor>();
     anim  = GetComponent <Animator>();
 }