Example #1
0
        public HConstraint()
        {
            _mask[HComponentIDs.Get(typeof(C1))]         = true;
            _mask[HComponentIDs.Get(typeof(C2))]         = true;
            _mask[HComponentIDs.Get(typeof(C3))]         = true;
            _mask[HComponentIDs.Get(typeof(C4))]         = true;
            _mask[HComponentIDs.Get(typeof(C5))]         = true;
            _mask[HComponentIDs.Get(typeof(C6))]         = true;
            _mask[HComponentIDs.Get(typeof(HComponent))] = true;

            HEvents <AddedComponent <C1> > .AddHandler(e => CreateBundle(e.hActor));

            HEvents <DestroyedComponent <C1> > .AddHandler(e => RemoveBundle(e.hActor));

            HEvents <AddedComponent <C2> > .AddHandler(e => CreateBundle(e.hActor));

            HEvents <DestroyedComponent <C2> > .AddHandler(e => RemoveBundle(e.hActor));

            HEvents <AddedComponent <C3> > .AddHandler(e => CreateBundle(e.hActor));

            HEvents <DestroyedComponent <C3> > .AddHandler(e => RemoveBundle(e.hActor));

            HEvents <AddedComponent <C4> > .AddHandler(e => CreateBundle(e.hActor));

            HEvents <DestroyedComponent <C4> > .AddHandler(e => RemoveBundle(e.hActor));

            HEvents <AddedComponent <C5> > .AddHandler(e => CreateBundle(e.hActor));

            HEvents <DestroyedComponent <C5> > .AddHandler(e => RemoveBundle(e.hActor));

            HEvents <AddedComponent <C6> > .AddHandler(e => CreateBundle(e.hActor));

            HEvents <DestroyedComponent <C6> > .AddHandler(e => RemoveBundle(e.hActor));
        }
Example #2
0
        public static void Start()
        {
            try
            {
                Log.Info("Hotfix.Init.Start()");

                HComponentIDs.Initialize();

                ICE.Game.Hotfix.Update            = () => { Update(); };
                ICE.Game.Hotfix.LateUpdate        = () => { LateUpdate(); };
                ICE.Game.Hotfix.OnApplicationQuit = () => { OnApplicationQuit(); };

                //Game.Scene.AddComponent<ActorManagerComponent>();

                HSystems.Add(new CubeSystem(), new CubeSystem2());
                HSystems.Start();

                //HotfixTestObj hotfixTestObj = new HotfixTestObj();

                UITest uiTest = new UITest();
                uiTest.Initialize();
            }
            catch (Exception e)
            {
                Log.Error(e);
            }
        }
Example #3
0
        public HConstraint()
        {
            _mask[HComponentIDs.Get(typeof(C1))]     = true;
            _mask[HComponentIDs.Get(typeof(HActor))] = true;

            HEvents <AddedComponent <C1> > .AddHandler(e => CreateBundle(e.hActor));

            HEvents <DestroyedComponent <C1> > .AddHandler(e => RemoveBundle(e.hActor));
        }