Ejemplo n.º 1
0
 private void RangedInput_InputChanged(IRangedCombatInput obj)
 {
     if (obj.IsZoomingEnabled != spCamera.IsZooming)
     {
         spCamera.SetZoom(obj.IsZoomingEnabled);
         if (!spCamera.IsZooming && fSMSpMovement.StateType == EMovementID.Idle &&
             fSMSpRangedCombat.StateType == ERangedAttackID.LayDown)
         {
             spCamera.ObjectRotator.CanRotate = this.invertoryInput.HasInputModel ?
                                                !this.invertoryInput.InputInfo.CurrentWeapons.IsMeleeEquipment :
                                                CAN_ROTATE;
         }
         else
         {
             spCamera.ObjectRotator.CanRotate = true;
         }
     }
 }
Ejemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        ICameraData camData = userCamera.GetComponent <ICameraData>();

        spCamera = camData.SpCamera;

        invertoryLogic = GetComponent <IInvertoryData>().InvertoryLogic;

        Transform           follow = transform;
        CharacterController characterController = GetComponent <CharacterController>();

        characterControl = new SpacemarineMove(ref characterController, ref follow, collideWith);

        movementInput = new SpMovementAndMeleeCombat(ref rayCastFrom, collideWith, ref characterController);
        movementLogic = new SpMovementAndMeleeLogic(movementInput);

        rangedInput = new RangedCombatInput();
        rangedLogic = new RangedCombatLogic(ref rangedInput, spCamera.CameraTransform);

        spaceMove = new ControlSpMovement(ref movementLogic, ref characterControl,
                                          ref characterAnimator, ref rangedLogic,
                                          ref invertoryLogic, ref spCamera);
    }
Ejemplo n.º 3
0
 public RangedCombatLogic(ref IRangedCombatInput combatInput, Transform cameraTransform)
 {
     this.InputInfo       = combatInput;
     this.cameraTransform = cameraTransform;
 }