Advertisement
Guest User

FCPlayerController.h

a guest
Oct 24th, 2015
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 8.34 KB | None | 0 0
  1. // Fill out your copyright notice in the Description page of Project Settings.
  2.  
  3. #pragma once
  4.  
  5. #include "GameFramework/PlayerController.h"
  6. #include "FCPlayerState.h"
  7. #include "FCWorldSettings.h"
  8. #include "FCFaction.h"
  9. #include "FCStratPawn.h"
  10. #include "FCHero.h"
  11. #include "Runtime/UMG/Public/Blueprint/UserWidget.h"
  12. #include "FCPlayerController.generated.h"
  13.  
  14. /**
  15.  *
  16.  */
  17. UCLASS()
  18. class FIELDCOMMANDER_API AFCPlayerController : public APlayerController
  19. {
  20.     GENERATED_BODY()
  21. public:
  22.     // The instance of the players Inventory UI Widget
  23.     UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "UI")
  24.     class UUserWidget* LobbyWidget;
  25.  
  26.     // The instance of the players Inventory UI Widget
  27.     UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "UI")
  28.     class UUserWidget* HUDWidget;
  29.  
  30.     UPROPERTY(replicatedUsing = OnRep_StratPawn, BlueprintReadOnly)
  31.     class AFCStratPawn* CurrentFCStratPawn;
  32.  
  33.     UPROPERTY(replicatedUsing = OnRep_HeroPawn, BlueprintReadOnly)
  34.     class AFCHero* CurrentFCHero;
  35.  
  36.     UPROPERTY()
  37.     FVector DragScrollStartLocation;
  38.  
  39.     UPROPERTY()
  40.     FVector DragScrollCursorStartLocation;
  41.  
  42.     UPROPERTY()
  43.     bool IsDragScrolling;
  44.  
  45.     UFUNCTION(BlueprintCallable, Category = "FCPlayerControllerActions")
  46.     void PlayerReadyUp(bool PlayerIsReady);
  47.  
  48.     UFUNCTION(Server, Reliable, WithValidation)
  49.     void ServerPlayerReadyUp(bool PlayerIsReady);
  50.  
  51.     UFUNCTION(BlueprintCallable, Category = "FCPlayerControllerActions")
  52.     void PlayerPickFaction(TSubclassOf<UFCFaction> NewFaction, bool IsRandomFaction);
  53.  
  54.     UFUNCTION(Server, Reliable, WithValidation)
  55.     void ServerPlayerPickFaction(TSubclassOf<UFCFaction> NewFaction, bool IsRandomFaction);
  56.  
  57.     UFUNCTION(BlueprintCallable, Category = "FCPlayerControllerActions")
  58.     void PlayerPickHero(TSubclassOf<AFCHero> NewHero, bool IsRandomHero);
  59.  
  60.     UFUNCTION(Server, Reliable, WithValidation)
  61.     void ServerPlayerPickHero(TSubclassOf<AFCHero> NewHero, bool IsRandomHero);
  62.  
  63.     UFUNCTION(BlueprintCallable, Category = "FCPlayerControllerActions")
  64.     void PlayerPickPlayerSlot(int32 TeamSlotIdx, int32 ForceSlotIdx, int32 PlayerSlotIdx);
  65.  
  66.     UFUNCTION(Server, Reliable, WithValidation)
  67.     void ServerPlayerPickPlayerSlot(int32 TeamSlotIdx, int32 ForceSlotIdx, int32 PlayerSlotIdx);
  68.  
  69.     UFUNCTION(BlueprintCallable, Category = "FCPlayerControllerActions")
  70.     void PlayerPickStartLocationForForce(int32 NewStartLocation);
  71.  
  72.     UFUNCTION(Server, Reliable, WithValidation)
  73.     void ServerPlayerPickStartLocationForForce(int32 NewStartLocation);
  74.  
  75.     UFUNCTION(BlueprintCallable, Category = "FCPlayerControllerActions")
  76.     void PlayerSpawnBase(int32 NewBaseLocation, bool InstantActivation);
  77.  
  78.     UFUNCTION(Server, Reliable, WithValidation)
  79.     void ServerPlayerSpawnBase(int32 NewBaseLocation, bool InstantActivation);
  80.  
  81.     UFUNCTION(BlueprintCallable, Category = "FCPlayerControllerActions")
  82.     void PlayerSpawnHero(FVector NewLocation);
  83.  
  84.     UFUNCTION(Server, Reliable, WithValidation)
  85.     void ServerPlayerSpawnHero(FVector NewLocation);
  86.  
  87.     UFUNCTION(BlueprintCallable, Category = "FCPlayerControllerActions")
  88.     void PlayerSwapPerspective(bool ToStratCam);
  89.  
  90.     UFUNCTION(Server, Reliable, WithValidation)
  91.     void ServerPlayerSwapPerspective(bool ToStratCam);
  92.  
  93.     UFUNCTION(BlueprintCallable, Category = "FCPlayerControllerHelpers")
  94.     class AFCWorldSettings* GetFCWorldSettings();
  95.    
  96.     virtual void BeginPlay() override;
  97.     /** Allows the PlayerController to set up custom input bindings. */
  98.     virtual void SetupInputComponent() override;
  99.    
  100.     virtual void PlayerTick(float DeltaTime) override;
  101.  
  102.     UFUNCTION(BlueprintCallable, Category = "FCInput")
  103.     virtual void HandleMoveForward(float Val);
  104.  
  105.     UFUNCTION(BlueprintCallable, Category = "FCInput")
  106.     virtual void HandleMoveRight(float Val);
  107.  
  108.     UFUNCTION(BlueprintCallable, Category = "FCInput")
  109.     virtual void HandleLookUp(float Val);
  110.  
  111.     UFUNCTION(BlueprintCallable, Category = "FCInput")
  112.     virtual void HandleLookRight(float Val);
  113.  
  114.     UFUNCTION(BlueprintCallable, Category = "FCInput")
  115.     virtual void HandleJump();
  116.  
  117.     UFUNCTION(BlueprintCallable, Category = "FCInput")
  118.     virtual void HandlePerspectiveSwap();
  119.  
  120.     UFUNCTION(BlueprintCallable, Category = "FCInput")
  121.     virtual void HandlePrimaryAction();
  122.  
  123.     UFUNCTION(BlueprintCallable, Category = "FCInput")
  124.     virtual void HandleSecondaryAction();
  125.  
  126.     UFUNCTION(BlueprintCallable, Category = "FCInput")
  127.     virtual void HandleTertiaryAction();
  128.  
  129.     UFUNCTION(BlueprintCallable, Category = "FCInput")
  130.     virtual void HandlePrimaryActionEnd();
  131.  
  132.     UFUNCTION(BlueprintCallable, Category = "FCInput")
  133.     virtual void HandleSecondaryActionEnd();
  134.  
  135.     UFUNCTION(BlueprintCallable, Category = "FCInput")
  136.     virtual void HandleTertiaryActionEnd();
  137.  
  138.     UFUNCTION(BlueprintCallable, Category = "FCInput")
  139.     virtual void HandleNextWeapon();
  140.  
  141.     UFUNCTION(BlueprintCallable, Category = "FCInput")
  142.     virtual void HandlePrevWeapon();
  143.  
  144.     UFUNCTION(BlueprintCallable, Category = "FCInput")
  145.     virtual void HandleStratCommand1();
  146.  
  147.     UFUNCTION(BlueprintCallable, Category = "FCInput")
  148.     virtual void HandleStratCommand2();
  149.  
  150.     UFUNCTION(BlueprintCallable, Category = "FCInput")
  151.     virtual void HandleStratCommand3();
  152.  
  153.     UFUNCTION(BlueprintCallable, Category = "FCInput")
  154.     virtual void HandleStratCommand4();
  155.  
  156.     UFUNCTION(BlueprintCallable, Category = "FCInput")
  157.     virtual void HandleStratCommand5();
  158.  
  159.     UFUNCTION(BlueprintCallable, Category = "FCInput")
  160.     virtual void HandleStratCommand6();
  161.  
  162.     UFUNCTION(BlueprintCallable, Category = "FCInput")
  163.     virtual void HandleStratCommand7();
  164.  
  165.     UFUNCTION(BlueprintCallable, Category = "FCInput")
  166.     virtual void HandleStratCommand8();
  167.  
  168.     UFUNCTION(BlueprintCallable, Category = "FCInput")
  169.     virtual void HandleStratCommand9();
  170.  
  171.     UFUNCTION(BlueprintCallable, Category = "FCInput")
  172.     virtual void HandleStratCommand0();
  173.  
  174.     UFUNCTION(BlueprintCallable, Category = "FCInput")
  175.     virtual void HandleHotGroup1();
  176.  
  177.     UFUNCTION(BlueprintCallable, Category = "FCInput")
  178.     virtual void HandleHotGroup2();
  179.  
  180.     UFUNCTION(BlueprintCallable, Category = "FCInput")
  181.     virtual void HandleHotGroup3();
  182.  
  183.     UFUNCTION(BlueprintCallable, Category = "FCInput")
  184.     virtual void HandleHotGroup4();
  185.  
  186.     UFUNCTION(BlueprintCallable, Category = "FCInput")
  187.     virtual void HandleHotGroup5();
  188.  
  189.     UFUNCTION(BlueprintCallable, Category = "FCInput")
  190.     virtual void HandleHotGroup6();
  191.  
  192.     UFUNCTION(BlueprintCallable, Category = "FCInput")
  193.     virtual void HandleHotGroup7();
  194.  
  195.     UFUNCTION(BlueprintCallable, Category = "FCInput")
  196.     virtual void HandleHotGroup8();
  197.  
  198.     UFUNCTION(BlueprintCallable, Category = "FCInput")
  199.     virtual void HandleHotGroup9();
  200.  
  201.     UFUNCTION(BlueprintCallable, Category = "FCInput")
  202.     virtual void HandleHotGroup10();
  203.  
  204.     UFUNCTION(BlueprintCallable, Category = "FCInput")
  205.     virtual void HandleSwapKey();
  206.  
  207.     UFUNCTION(BlueprintCallable, Category = "FCInput")
  208.     virtual void HandleCancelKey();
  209.  
  210.     UFUNCTION(BlueprintCallable, Category = "FCInput")
  211.     virtual void SelectHotGroup(int32 group);
  212.  
  213.     UFUNCTION(BlueprintCallable, Category = "FCInput")
  214.     virtual void GiveStratCommand(int32 Idx);
  215.  
  216.     /** FC Strat Pawn notification callback. */
  217.     UFUNCTION()
  218.     virtual void OnRep_StratPawn();
  219.  
  220.     /** FC Hero Pawn notification callback. */
  221.     UFUNCTION()
  222.     virtual void OnRep_HeroPawn();
  223.  
  224.     UFUNCTION(BlueprintCallable, Category = "FCPlayerControllerActions")
  225.     void PlayerSelectUnits(const TArray<AFCUnit*>& NewUnits);
  226.  
  227.     UFUNCTION(Server, Reliable, WithValidation)
  228.     void ServerPlayerSelectUnits(const TArray<AFCUnit*>& NewUnits);
  229.  
  230.     UFUNCTION(BlueprintCallable, Category = "FCPlayerControllerActions")
  231.     void PlayerDeselectUnits(const TArray<AFCUnit*>& NewUnits);
  232.  
  233.     UFUNCTION(Server, Reliable, WithValidation)
  234.     void ServerPlayerDeselectUnits(const TArray<AFCUnit*>& NewUnits);
  235.  
  236.     UFUNCTION(BlueprintCallable, Category = "FCPlayerControllerActions")
  237.     void PlayerDeselectAllUnits();
  238.  
  239.     UFUNCTION(Server, Reliable, WithValidation)
  240.     void ServerPlayerDeselectAllUnits();
  241.  
  242.     UFUNCTION(BlueprintCallable, Category = "FCPlayerControllerActions")
  243.     void PlayerChangeCommandMenuPage(int32 newpage);
  244.  
  245.     UFUNCTION(Server, Reliable, WithValidation)
  246.     void ServerPlayerChangeCommandMenuPage(int32 newpage);
  247.  
  248.     UFUNCTION(BlueprintCallable, Category = "FCPlayerControllerActions")
  249.     void PlayerChangeSubSelectionUnitType(TSubclassOf<AFCUnit> NewUnitType);
  250.  
  251.     UFUNCTION(Server, Reliable, WithValidation)
  252.     void ServerPlayerChangeSubSelectionUnitType(TSubclassOf<AFCUnit> NewUnitType);
  253.  
  254.     bool HasReceivedGameModeFactionClasses;
  255.     virtual void ReceivedGameModeFactionClasses();
  256. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement