Indie Dev

Hello Guest!. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, sell your games, upload content, as well as connect with other members through your own private inbox!

How to alias a method in SceneManager static class

eshrasic

Villager
Xy$
0.00
How do you properly alias a method inside the SceneManager class?
For example if I wanted to alias
onKeyDown
I cannot do:
var alias _scene_mnger_keydwn = SceneManager.prototype.onKeyDown

what is the proper syntax here?
 

LTN Games

Master Mind
Resource Team
Xy$
0.01
That is the correct way to alias, as soon as its aliased you need to call it wherever the best location is according to your script, using.
Code:
alias_scene_mngr.call(this);
 

Mr. Trivel

Praised Adventurer
Xy$
0.00
Actually SceneManager's methods are not in prototype, since it's a static class.
So you want to do:
Code:
var alias_scene_mnger_keydwn = SceneManager.onKeyDown;
 
Top