mirror of
https://github.com/Ed94/Cog.git
synced 2026-08-05 07:08:46 +00:00
Merge branch 'main' of https://github.com/arnaud-jamin/Cog
This commit is contained in:
@@ -375,7 +375,19 @@ void ACogSampleGameState::BeginPlay()
|
|||||||
|
|
||||||
- Tick the CogWindowManager:
|
- Tick the CogWindowManager:
|
||||||
```cpp
|
```cpp
|
||||||
|
|
||||||
// ACogSampleGameState.cpp
|
// ACogSampleGameState.cpp
|
||||||
|
ACogSampleGameState::ACogSampleGameState(const FObjectInitializer & ObjectInitializer)
|
||||||
|
: Super(ObjectInitializer)
|
||||||
|
{
|
||||||
|
// Enable ticking
|
||||||
|
PrimaryActorTick.bCanEverTick = true;
|
||||||
|
PrimaryActorTick.SetTickFunctionEnable(true);
|
||||||
|
PrimaryActorTick.bStartWithTickEnabled = true;
|
||||||
|
|
||||||
|
[...]
|
||||||
|
}
|
||||||
|
|
||||||
void ACogSampleGameState::Tick(float DeltaSeconds)
|
void ACogSampleGameState::Tick(float DeltaSeconds)
|
||||||
{
|
{
|
||||||
Super::Tick(DeltaSeconds);
|
Super::Tick(DeltaSeconds);
|
||||||
@@ -386,6 +398,8 @@ void ACogSampleGameState::Tick(float DeltaSeconds)
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- In your PlayerController class, spawn the Cog Replicators. The Replicator are used to communicate between the client and the server, for example to apply cheats, spawn actors, etc.
|
- In your PlayerController class, spawn the Cog Replicators. The Replicator are used to communicate between the client and the server, for example to apply cheats, spawn actors, etc.
|
||||||
```cpp
|
```cpp
|
||||||
void ACogSamplePlayerController::BeginPlay()
|
void ACogSamplePlayerController::BeginPlay()
|
||||||
|
|||||||
Reference in New Issue
Block a user