Advertisement
Guest User

MusicalRangeInstance Header

a guest
Feb 27th, 2017
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.09 KB | None | 0 0
  1. // Fill out your copyright notice in the Description page of Project Settings.
  2.  
  3. #pragma once
  4.  
  5. #include "ThirdParty/Steamworks/Steamv132/sdk/public/steam/steam_api.h"
  6. #include "Engine/GameInstance.h"
  7. #include "OnlineSubsystemSteam.h"
  8. #include "MusicalRangeInstance.generated.h"
  9.  
  10.  
  11. /*~~~ Forward Declarations ~~~*/
  12. class FSteamworksCallbackAsync;
  13.  
  14. /**
  15.  *
  16.  */
  17. UCLASS()
  18. class MUSICALRANGE_API UMusicalRangeInstance : public UGameInstance
  19. {
  20.     GENERATED_BODY()
  21.  
  22. private:
  23.  
  24. protected:
  25.  
  26. public:
  27.     UMusicalRangeInstance();
  28.     ~UMusicalRangeInstance();
  29.  
  30.     /** Cached reference to FSteamworksCallbackAsync */
  31.     FSteamworksCallbackAsync* CallbackAsyncVariable;
  32.  
  33.     /* test the functionality of the Game Instance */
  34.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Game Instance")
  35.     int32 InterLevelPersitentValue;
  36.  
  37.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Steamworks")
  38.     bool IsSteamOverlayActive;
  39.    
  40.     UFUNCTION(BlueprintCallable, category = "Game Instance")
  41.     bool InterLevelPersitentValuePONE();
  42.    
  43.     /*
  44.     * Must be called every frame so callbacks can be received
  45.     * Always Return True!
  46.     */
  47.     UFUNCTION(BlueprintCallable, category = "Steamworks")
  48.     bool RunSteamCallbacks();
  49.  
  50.     UFUNCTION(BlueprintImplementableEvent, Category = "Steamworks")
  51.     void OnSteamOverlayIsActive(bool isOverlayActive);
  52.  
  53.     void SteamOverlayActive();
  54.        
  55.     void OnSteamOverlayEnabled(GameOverlayActivated_t *pResult, bool bIOFailure);
  56.     CCallResult<UMusicalRangeInstance, GameOverlayActivated_t> m_callResultGameOverlayActive;
  57. };
  58.  
  59.  
  60. /*
  61. * Class to handle the Steamworks Callbacks, as the UCLASS macro won't allow it to compile otherwise
  62. * Experimental
  63. */
  64. class MUSICALRANGE_API FSteamworksCallbackAsync
  65. {
  66.  
  67. private:
  68.     STEAM_CALLBACK(FSteamworksCallbackAsync, OnSteamOverlayActive, GameOverlayActivated_t, OnSteamOverlayActiveCallback);
  69.  
  70. public:
  71.  
  72.     //Constructors
  73.  
  74.     FSteamworksCallbackAsync();
  75.     ~FSteamworksCallbackAsync();
  76.  
  77.     void AssignGameInstance(UMusicalRangeInstance *NewMusicalRangeGameInstance);
  78.  
  79.     UMusicalRangeInstance *MusicalRangeGameInstance;
  80.     FOnlineSubsystemSteam *LiveSteamSubsystem;
  81. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement