2010-01-09 11:20:14 -08:00
|
|
|
function TestScript1A() {}
|
|
|
|
|
|
2025-12-30 00:57:37 -08:00
|
|
|
TestScript1A.prototype.GetX = function()
|
|
|
|
|
{
|
2010-01-09 11:20:14 -08:00
|
|
|
// Test that .entity is readonly
|
2025-12-30 00:57:37 -08:00
|
|
|
try
|
|
|
|
|
{
|
2010-11-16 15:00:52 -08:00
|
|
|
delete this.entity;
|
|
|
|
|
Engine.TS_FAIL("Missed exception");
|
2025-12-30 00:57:37 -08:00
|
|
|
}
|
|
|
|
|
catch(e) { /* noop */ }
|
|
|
|
|
try
|
|
|
|
|
{
|
2010-11-16 15:00:52 -08:00
|
|
|
this.entity = -1;
|
|
|
|
|
Engine.TS_FAIL("Missed exception");
|
2025-12-30 00:57:37 -08:00
|
|
|
}
|
|
|
|
|
catch(e) { /* noop */ }
|
2025-05-03 08:30:55 -07:00
|
|
|
|
2010-01-09 11:20:14 -08:00
|
|
|
// and return the value
|
|
|
|
|
return this.entity;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Engine.RegisterComponentType(IID_Test1, "TestScript1A", TestScript1A);
|