This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- error message monad here | |
| data E a = Success a | Error String | |
| unitE a = Success a | |
| errorE s = Error s | |
| (Success a) `bindE` k = k a | |
| (Error s) `bindE` k = Error s | |
| showE (Success a) = "Success: " ++ showval a | |
| showE (Error s) = "Error: " ++ s | |
| showpos :: Position -> String |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Internal register table | |
| local _class={} | |
| --Create an class(为了不与cocos2d-x中给出的class的名字冲突,这里创建接口改名为luaClass) | |
| function luaClass(base) | |
| local superType = type(base) | |
| local vtbl = {} | |
| local class_type = {} | |
| class_type.ctor = false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## 空state,不产生任何的效果 | |
| class State(object): | |
| def __init__(self): | |
| pass | |
| def enter(self, entity, param_table, state_maintain, global_maintain): | |
| pass | |
| def update(self, entity, param_table, state_maintain, global_maintain): | |
| pass |
OlderNewer