71 uint8_t m_bHasFinishedSpawning : 1;
79 uint8_t m_bActorInitialized : 1;
85 static uint32_t m_BeginPlayCallDepth;
94 std::shared_ptr<UChildActorComponent> m_ParentComponent;
109 enum class EActorBeginPlayState : uint8_t
122 EActorBeginPlayState m_ActorHasBegunPlay : 2;
130 uint8_t m_bActorBeginningPlayFromLevelStreaming : 1;
137 uint8_t m_bActorWantsDestroyDuringBeginPlay : 1;
144 uint8_t m_bAutoDestroyWhenFinished : 1;
185 bool HasActorBegunPlay()
const {
return m_ActorHasBegunPlay == EActorBeginPlayState::HasBegunPlay; }
200 void DispatchBeginPlay(
bool bFromLevelStreaming =
false);
208 virtual void SetOwner(
AActor* NewOwner);
217 void FinishSpawning(
const FTransform& Transform,
bool bIsDefaultTransform =
false);
229 for (
const AActor* Arg =
this; Arg; Arg = Arg->m_Owner)
231 if (Arg == TestOwner)
244 void PostActorConstruction();
260 OutComponents.SmartReset();
263 typename std::vector<std::shared_ptr<UActorComponent>>::const_iterator iterator = m_OwnedComponents.GetElements().begin();
267 while (iterator != m_OwnedComponents.GetElements().end())
270 if (tempSceneComponent !=
nullptr)
272 OutComponents.Add(tempSceneComponent);
296 OutComponents.SmartReset();
299 typename std::vector<std::shared_ptr<UActorComponent>>::const_iterator iterator = m_OwnedComponents.GetElements().begin();
303 while (iterator != m_OwnedComponents.GetElements().end())
306 if (tempSceneComponent !=
nullptr)
308 OutComponents.Add(tempSceneComponent);
321 void SetInstigator(APawn* InInstigator);
345 static void DispatchOnComponentsCreated(
AActor* NewActor);
373 bool SetActorTransform(
const FTransform& NewTransform);
378 bool SetActorLocation(
const glm::vec3& NewLocation);
380 bool SetActorRotation(
TRotator NewRotation);
383 void SetActorScale3D(glm::vec3 NewScale3D);
402 void InitializeComponents();
410 virtual void PostInitializeComponents();
420 AActor* GetParentActor()
const;
437 void RemoveOwnedComponent(std::shared_ptr<UActorComponent> Component);
460 bool CanTick()
const {
return m_bCanEverTick; }
478 virtual void Tick(
float DeltaSeconds);
This file contains the macros for Karma's classes' general purpose use, including assertions and stor...
#define KARMA_API
Defining Karma's API macro for storage class information.
Definition Core.h:41
#define FORCEINLINE
Typical inlining macro for clarity.
Definition Core.h:170
#define DECLARE_KARMA_CLASS(TClass, TSuperClass)
Karma's gamecode object class declaration.
Definition GFrameworkMacros.h:45
This file contains the custom types used in Engine's logic.
This file contains the Log class. I want to imagine the Log pronounciation match with that of that ht...
This file contains the class UObject along with helper functions.
This file contains the class USceneComponent.
Actor is the base class for an object that can be placed or spawned in a level.
Definition Actor.h:35
USceneComponent * m_RootComponent
Definition Actor.h:520
ULevel * GetLevel() const
Definition Actor.cpp:18
AActor()
Definition Actor.cpp:12
bool GetAutoDestroyWhenFinished() const
Definition Actor.h:444
void DisableTick(bool bDisable)
Definition Actor.h:468
const FTransform & GetTransform() const
Definition Actor.h:353
virtual void BeginPlay()
Definition Actor.cpp:381
KarmaVector< AActor * > m_Children
Definition Actor.h:497
bool IsOwnedBy(const AActor *TestOwner) const
Definition Actor.h:227
AActor * m_Owner
Definition Actor.h:491
bool HasActorBegunPlay() const
Definition Actor.h:185
void GetComponents(KarmaVector< UActorComponent * > &OutComponents) const
Definition Actor.h:290
void PostSpawnInitialize(FTransform const &SpawnTransform, AActor *InOwner, APawn *InInstigator, bool bRemoteOwned, bool bNoFail, bool bDeferConstruction)
Definition Actor.cpp:437
const FTransform & ActorToWorld() const
Definition Actor.h:391
void GetComponents(KarmaVector< USceneComponent * > &OutComponents) const
Definition Actor.h:254
bool CanTick() const
Definition Actor.h:460
float m_CreationTime
Definition Actor.h:485
virtual UWorld * GetWorld() const override final
Definition Actor.cpp:23
FORCEINLINE USceneComponent * GetRootComponent() const
Definition Actor.h:329
bool IsActorBeginningPlay() const
Definition Actor.h:192
ActorComponent is the base class for components that define reusable behavior that can be added to di...
Definition ActorComponent.h:61
A component that spawns an Actor when registered, and destroys it when unregistered.
Definition ChildActorComponent.h:23
A Level is a collection of Actors (lights, volumes, mesh instances etc.). Multiple Levels can be load...
Definition Level.h:28
UObject()
Definition Object.cpp:10
A SceneComponent has a transform and supports attachment, but has no rendering or collision capabilit...
Definition SceneComponent.h:42
The World is the top level object representing a map or a sandbox in which Actors and Components will...
Definition World.h:148
Karma's std::vector wrapper with additional functionalities.
Definition KarmaTypes.h:243
Implements a container for rotation information.
Definition Transform.h:66