I am trying to create my own class that inherits from Window_Base, the problem is that it constantly throws an error that the constructor expects a rectangle object even though I have given it one.
While if I simply create a Window_Base object it does not throw any errors, so I would like to understand what is happening.
My class super simple
And the function I use to create it is this
What am I missing?
While if I simply create a Window_Base object it does not throw any errors, so I would like to understand what is happening.
My class super simple
JavaScript:
class MyOwnWindow extends Window_Base {
constructor() {
super();
};
debugThisClass() {
alert("Works")
};
};
And the function I use to create it is this
JavaScript:
function makeTheWindow(){
var myWindow = new MyOwnWindow(new Rectangle(10,10,200,300))
var scene = SceneManager._scene;
scene.addChild(myWindow);
}
What am I missing?