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; }
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> (); }
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>(); }
void Start() { Motor = this.transform.GetComponent<MovementMotor> (); firstScan = true; }
private void Awake() { motor = GetComponent <MovementMotor>(); anim = GetComponent <Animator>(); }