- Create a new Actor class called TimeOfDayHandler, as shown in the following screenshot:
- Add a multicast delegate declaration to the header:
DECLARE_MULTICAST_DELEGATE_TwoParams(FOnTimeChangedSignature, int32, int32)UCLASS()class CHAPTER_05_API ATimeOfDayHandler : public AActor
- Add an instance of our delegate to the class declaration in the public section:
FOnTimeChangedSignature OnTimeChanged;
- Add the following properties to the class:
UPROPERTY() int32 TimeScale; UPROPERTY() int32 Hours; UPROPERTY() int32 Minutes; UPROPERTY() float ElapsedSeconds;
- Add the initialization of these properties to the constructor: ...