2018-10-06 20:42:33 -07:00
|
|
|
#pragma once
|
2016-05-12 20:13:34 -07:00
|
|
|
|
2019-09-23 12:00:23 -07:00
|
|
|
#include <string_view>
|
|
|
|
|
|
|
|
#include "Runtime/CPlayerState.hpp"
|
|
|
|
#include "Runtime/RetroTypes.hpp"
|
|
|
|
#include "Runtime/World/CPhysicsActor.hpp"
|
2016-05-12 20:13:34 -07:00
|
|
|
|
2021-04-10 01:42:06 -07:00
|
|
|
namespace metaforce {
|
2018-12-07 21:30:43 -08:00
|
|
|
class CScriptPickup : public CPhysicsActor {
|
|
|
|
CPlayerState::EItemType x258_itemType;
|
2019-02-17 21:47:46 -08:00
|
|
|
s32 x25c_amount;
|
|
|
|
s32 x260_capacity;
|
2018-12-07 21:30:43 -08:00
|
|
|
float x264_possibility;
|
2019-02-17 21:47:46 -08:00
|
|
|
float x268_fadeInTime;
|
|
|
|
float x26c_lifeTime;
|
|
|
|
float x270_curTime = 0.f;
|
2020-04-13 13:31:25 -07:00
|
|
|
float x274_tractorTime = 0.f;
|
2019-02-17 21:47:46 -08:00
|
|
|
float x278_delayTimer;
|
|
|
|
TLockedToken<CGenDescription> x27c_pickupParticleDesc;
|
2017-09-12 08:27:48 -07:00
|
|
|
|
2020-04-19 21:57:50 -07:00
|
|
|
bool x28c_24_generated : 1 = false;
|
|
|
|
bool x28c_25_inTractor : 1 = false;
|
|
|
|
bool x28c_26_enableTractorTest : 1 = false;
|
2017-09-12 08:27:48 -07:00
|
|
|
|
2016-05-12 20:13:34 -07:00
|
|
|
public:
|
2021-05-26 07:00:57 -07:00
|
|
|
DEFINE_ENTITY
|
2019-02-17 21:47:46 -08:00
|
|
|
CScriptPickup(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf,
|
|
|
|
CModelData&& mData, const CActorParameters& aParams, const zeus::CAABox& aabb,
|
2021-06-07 12:29:18 -07:00
|
|
|
CPlayerState::EItemType itemType, s32 amount, s32 capacity, CAssetId pickupEffect, float possibility,
|
|
|
|
float lifeTime, float fadeInTime, float startDelay, bool active);
|
2017-01-14 19:07:01 -08:00
|
|
|
|
2019-08-09 05:45:18 -07:00
|
|
|
void Accept(IVisitor& visitor) override;
|
|
|
|
void Think(float, CStateManager&) override;
|
|
|
|
void Touch(CActor&, CStateManager&) override;
|
|
|
|
std::optional<zeus::CAABox> GetTouchBounds() const override { return CPhysicsActor::GetBoundingBox(); }
|
2018-12-07 21:30:43 -08:00
|
|
|
float GetPossibility() const { return x264_possibility; }
|
2019-02-17 21:47:46 -08:00
|
|
|
CPlayerState::EItemType GetItem() const { return x258_itemType; }
|
|
|
|
void SetGenerated() { x28c_24_generated = true; }
|
2016-05-12 20:13:34 -07:00
|
|
|
};
|
2021-04-10 01:42:06 -07:00
|
|
|
} // namespace metaforce
|