Status: | New | |
---|---|---|
Start date: | 2014-07-08 | |
Priority: | Normal | |
Due date: | ||
Assignee: | ||
% Done: | 0% |
|
Category: | - | |
Target version: | Unplanned |
Status: | New | |
---|---|---|
Start date: | 2014-07-08 | |
Priority: | Normal | |
Due date: | ||
Assignee: | ||
% Done: | 0% |
|
Category: | - | |
Target version: | Unplanned |
There are some functions in engine which is always invoked by C++
So if we inherit a class from engine class, and want to rewrite these functions, we need to call the js functions directly in C++, there is an solution for onEnter/onExit today, but it is very confusing and need to modify all classes which have onEnter function.
Take onEnter as example
Maybe it's better to add a fake
onEnter
function to detect whether there is a js overrided implementation ofonEnter
, if yes, invoke the extendedonEnter
function, otherwise call C++ original_onEnter
function. This means the originalonEnter
function will be renamed to_onEnter
and delegate to the fakeonEnter