A basic object in my game would look like this:
class objActor_controller
{
Object @object;
float x;
float y;
int animation;
int[] animation_begin;
int[] animation_end;
objActor_controller(Object @obj)
{
@this.object = obj;
x = object.x;
y = object.y;
}
void Create()
{
//Does some initial setup
}
}
Lets say I decide to write a child class:
class objPlayer_controller : objActor_controller
{
Object @object;
float x;
float y;
Child_controller(Object @obj)
{
@this.object = obj;
x = object.x;
y = object.y;
}
void Create()
{
objActor_controller::Create();
//Sets up animations specific for this character...
}
void Step()
{
x += 1;
y += 1;
}
}
Using the method above makes the compiler complain about name conflicts with x, y and @object since my game editor automatically adds these. Since the C++ equivilent allows for it, Shouldn't AngelScript allow this too?