#pragma once

#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "GameActor.generated.h"

UCLASS()
class MYGAME_API AGameActor : public AActor
{
    GENERATED_BODY()

public:
    // BAD: Exec functions can be called from console by cheaters
    UFUNCTION(Exec)
    void CheatGiveGold();

    UFUNCTION(Exec, Category="Debug")
    void DebugTeleport();

    // BAD: Replicated without condition - bandwidth waste
    UPROPERTY(Replicated)
    int32 PlayerHealth;

    UPROPERTY(Replicated)
    FVector LastPosition;

protected:
    // BAD: Hardcoded asset path - fragile
    void LoadAssets()
    {
        UObject* Sword = LoadObject<UObject>(nullptr, TEXT("/Game/Items/Sword.Sword"));
        UObject* Shield = LoadObject<UObject>(nullptr, TEXT("/Engine/BasicShapes/Cube.Cube"));
    }
};
