SpaghettiKart
Loading...
Searching...
No Matches
Starship.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <libultraship.h>
4
#include <libultra/gbi.h>
5
#include "
CoreMath.h
"
6
#include "
engine/registry/RegisterContent.h
"
7
#include "
engine/Actor.h
"
8
#include "
engine/World.h
"
9
10
extern
"C"
{
11
#include "
common_structs.h
"
12
#include "
assets/textures/other_textures.h
"
13
}
14
15
class
AStarship
:
public
AActor
{
16
public
:
17
explicit
AStarship
(
const
SpawnParams
& params);
18
virtual
~AStarship
() =
default
;
19
20
// This is simply a helper function to keep Spawning code clean
21
static
AStarship
*
Spawn
(
FVector
pos,
IRotator
rot,
FVector
scale, f32 speed, f32 radius) {
22
SpawnParams
params = {
23
.Name =
"hm:starship"
,
24
.Location = pos,
25
.Rotation = rot,
26
.Scale = scale,
27
.Speed = speed,
28
.SpeedB = radius,
29
};
30
return
dynamic_cast<
AStarship
*
>
(
AddActorToWorld<AStarship>
(params));
31
}
32
33
float
SpeedB
;
34
35
virtual
void
SetSpawnParams
(
SpawnParams
& params)
override
;
36
virtual
void
Tick
()
override
;
37
virtual
bool
IsMod
()
override
;
38
virtual
void
BeginPlay
()
override
;
39
virtual
void
DrawEditorProperties
()
override
;
40
};
Actor.h
CoreMath.h
RegisterContent.h
AddActorToWorld
static AActor * AddActorToWorld(const SpawnParams ¶ms)
Definition
RegisterContent.h:14
World.h
AActor::AActor
AActor()
Definition
Actor.cpp:13
AStarship::Tick
virtual void Tick() override
Definition
Starship.cpp:43
AStarship::AStarship
AStarship(const SpawnParams ¶ms)
Definition
Starship.cpp:14
AStarship::SetSpawnParams
virtual void SetSpawnParams(SpawnParams ¶ms) override
Definition
Starship.cpp:29
AStarship::DrawEditorProperties
virtual void DrawEditorProperties() override
Definition
Starship.cpp:65
AStarship::SpeedB
float SpeedB
Definition
Starship.h:33
AStarship::IsMod
virtual bool IsMod() override
Definition
Starship.cpp:63
AStarship::Spawn
static AStarship * Spawn(FVector pos, IRotator rot, FVector scale, f32 speed, f32 radius)
Definition
Starship.h:21
AStarship::~AStarship
virtual ~AStarship()=default
AStarship::BeginPlay
virtual void BeginPlay() override
Definition
Starship.cpp:34
common_structs.h
other_textures.h
FVector
Definition
CoreMath.h:30
IRotator
Definition
CoreMath.h:141
SpawnParams
Definition
SpawnParams.h:30
src
engine
actors
Starship.h
Generated by
1.13.2