SpawnActor stuff
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Prospect.Unreal.Core;
|
||||
using Prospect.Unreal.Core.Math;
|
||||
using Prospect.Unreal.Core.Objects;
|
||||
using Prospect.Unreal.Runtime;
|
||||
|
||||
@@ -7,13 +8,20 @@ namespace Prospect.Unreal.Net.Actors;
|
||||
public class AActor : UObject
|
||||
{
|
||||
private bool bActorInitialized;
|
||||
|
||||
private bool bActorIsBeingDestroyed;
|
||||
|
||||
// TODO: UPROPERTY(BlueprintReadWrite, ReplicatedUsing=OnRep_Instigator, meta=(ExposeOnSpawn=true, AllowPrivateAccess=true), Category=Actor)
|
||||
/// <summary>
|
||||
/// Pawn responsible for damage and other gameplay events caused by this actor.
|
||||
/// </summary>
|
||||
private APawn? _instigator;
|
||||
|
||||
// TODO: UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Actor)
|
||||
/// <summary>
|
||||
/// Controls how to handle spawning this actor in a situation where it's colliding with something else. "Default" means AlwaysSpawn here.
|
||||
/// </summary>
|
||||
public ESpawnActorCollisionHandlingMethod SpawnCollisionHandlingMethod { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Sets the value of Role without causing other side effects to this instance.
|
||||
/// </summary>
|
||||
@@ -81,4 +89,22 @@ public class AActor : UObject
|
||||
{
|
||||
return bActorInitialized;
|
||||
}
|
||||
|
||||
public bool IsPendingKillPending()
|
||||
{
|
||||
return bActorIsBeingDestroyed || IsPendingKill();
|
||||
}
|
||||
|
||||
public void PostSpawnInitialize(FTransform userSpawnTransform, AActor? inOwner, AActor? inInstigator, bool bRemoteOwned, bool bNoFail, bool bDeferConstruction)
|
||||
{
|
||||
// General flow here is like so
|
||||
// - Actor sets up the basics.
|
||||
// - Actor gets PreInitializeComponents()
|
||||
// - Actor constructs itself, after which its components should be fully assembled
|
||||
// - Actor components get OnComponentCreated
|
||||
// - Actor components get InitializeComponent
|
||||
// - Actor gets PostInitializeComponents() once everything is set up
|
||||
//
|
||||
// This should be the same sequence for deferred or nondeferred spawning.
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user