Added support for enabling and disabling components from scripts #279
|
@ -22,6 +22,14 @@ of DigiPen Institute of Technology is prohibited.
|
|||
|
||||
namespace SHADE
|
||||
{
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
/* Properties */
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
GameObject BaseComponent::Owner::get()
|
||||
{
|
||||
return owner;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
/* Component Access Functions */
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
|
|
|
@ -36,7 +36,7 @@ namespace SHADE
|
|||
/// </summary>
|
||||
property GameObject Owner
|
||||
{
|
||||
GameObject get() { return owner; }
|
||||
GameObject get();
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
|
@ -166,6 +166,19 @@ namespace SHADE
|
|||
template<typename NativeType>
|
||||
public ref class Component : public BaseComponent
|
||||
{
|
||||
public:
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
/* Properties */
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
/// <summary>
|
||||
/// Whether or not the Component is active and being updated by the engine.
|
||||
/// </summary>
|
||||
property bool Enabled
|
||||
{
|
||||
bool get() { return GetNativeComponent()->isActive; }
|
||||
void set(bool value) { GetNativeComponent()->isActive = value; }
|
||||
}
|
||||
|
||||
internal:
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
/* Type Definitions */
|
||||
|
|
Loading…
Reference in New Issue