Aliasing the xManager functions

What is the difference between a function specified as a prototype and one that's not?  For example, 


Tilemap.prototype._sortChildren = function()


and 


Tilemap.isVisibleTile = function(tileId)


Can I alias both of them, and do I alias them and call them in the same way?


When I call the aliased function, how do I know whether I have to pass in this as a first parameter, and when I don't?  Tilemap.isVisibleTile uses this.TILE_ID_MAX so I assume whether I pass in this has nothing to do with whether it's a prototype function?
The difference between the prototype and the other type of function is that a prototype requires you create a new object to use that function call,  and the other type is accessible only by calling the  Function itself.


Prototypes are good, cause you can do inheritance for objects, make multiple objects.


The other one is great for a static class like the DataManager, which you only want a single instance of.


Also you are correct, this has nothing to do with it being a prototype or not. If you use strict mode, "this" will be different depending on where it's called.


Think of  "this" as the box in which your code will run.


Rule of thumb  though : pass "this" to a function inside a function,  like when you alias and call a prototype. Otherwise,  no need to use "this", while calling,  since it applies the code to that object(this).


On aliasing,  you can alias it as a variable I believe. I do it often with the DataManager  class.
Thank you 🙂
Think prototype is like class method, and without prototype is like module/namespace function. 🙂
Ah, nice, easy explanation.  Thanks @Dr.Yami 🙂

Original thread: https://forums.rpgmakerweb.com/threads/aliasing-the-xmanager-functions.64625/