Пример #1
0
        public ScreenController(string name, IGameForModel game, IScreenForModel screen)
        {
            this.game   = game;
            this.screen = screen;


            IScriptModel script = game.GetModel("script") as IScriptModel;

            env = script.getScriptEnv();
            var type = env.GetTypeByKeywordQuiet(name) as CSLE.CLS_Type_Class;

            content    = new CSLE.CLS_Content(env);
            scriptThis = type.function.New(content, null).value as CSLE.SInstance;
            scriptThis.member["game"]         = new CSLE.CLS_Content.Value();
            scriptThis.member["game"].value   = game;
            scriptThis.member["game"].type    = typeof(IGameForModel);
            scriptThis.member["screen"]       = new CSLE.CLS_Content.Value();
            scriptThis.member["screen"].value = screen;
            scriptThis.member["screen"].type  = typeof(IScreenForModel);


            var typeasync = env.GetTypeByKeywordQuiet("IScreenControllerAsync") as CSLE.CLS_Type_Class;

            try
            {
                havetypeasync = (type.ConvertTo(content, scriptThis, typeasync.type) != null);
            }
            catch
            {
                havetypeasync = false;
            }
            Debug.Log(havetypeasync);
        }
Пример #2
0
 public void Init(IGameForModel game)
 {
     this.game = game;
 }
Пример #3
0
 public ScriptModel(IGameForModel game)
 {
 }
Пример #4
0
 public UIToolModel(IGameForModel game)
 {
     this.game = game;
 }
Пример #5
0
 public BlockSceneModel(IGameForModel game)
 {
     this.game = game;
 }
Пример #6
0
 public ScreenProxy(string scenenname, IGameForModel game)
 {
     this.name = scenenname;
     this.game = game;
 }
Пример #7
0
 public Screen(string scenenname, IGameForModel game)
 {
     controller = new ScreenController(scenenname, game, this);
     this.name  = scenenname;
 }