2010-01-09 20:20:14 +01:00
|
|
|
function TestScript1A() {}
|
|
|
|
|
|
|
|
TestScript1A.prototype.GetX = function() {
|
|
|
|
// Test that .entity is readonly
|
2010-11-17 00:00:52 +01:00
|
|
|
try {
|
|
|
|
delete this.entity;
|
|
|
|
Engine.TS_FAIL("Missed exception");
|
|
|
|
} catch (e) { }
|
|
|
|
try {
|
|
|
|
this.entity = -1;
|
|
|
|
Engine.TS_FAIL("Missed exception");
|
|
|
|
} catch (e) { }
|
2010-01-09 20:20:14 +01:00
|
|
|
|
|
|
|
// and return the value
|
|
|
|
return this.entity;
|
|
|
|
};
|
|
|
|
|
|
|
|
Engine.RegisterComponentType(IID_Test1, "TestScript1A", TestScript1A);
|