mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-27 23:35:45 +00:00
Updates to various components, added a few new ones.
This commit is contained in:
parent
775ca57047
commit
34d05ff16f
52 changed files with 4566 additions and 1799 deletions
30
Engine/source/T3D/components/game/interactableComponent.h
Normal file
30
Engine/source/T3D/components/game/interactableComponent.h
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
#pragma once
|
||||
|
||||
#include "T3D/components/component.h"
|
||||
#include "T3D/components/game/interactComponent.h"
|
||||
|
||||
class InteractableComponent : public Component
|
||||
{
|
||||
typedef Component Parent;
|
||||
|
||||
//Controls importance values when using radius mode for interaction
|
||||
F32 mInteractableWeight;
|
||||
|
||||
public:
|
||||
InteractableComponent();
|
||||
~InteractableComponent();
|
||||
|
||||
DECLARE_CONOBJECT(InteractableComponent);
|
||||
|
||||
virtual bool onAdd();
|
||||
virtual void onRemove();
|
||||
static void initPersistFields();
|
||||
|
||||
virtual void onComponentAdd();
|
||||
virtual void onComponentRemove();
|
||||
|
||||
void interact(InteractComponent* interactor);
|
||||
void interact(InteractComponent* interactor, RayInfo rayInfo);
|
||||
|
||||
F32 getWeight() { return mInteractableWeight; }
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue