Esempio n. 1
0
        public static bool NewFactory(PaxIntent p_intent, out PaxState p_state)
        {
            PaxState parent0 = null;

            if (!PaxState._root.TryFindChildState(p_intent, out parent0))
            {
                p_state = null;
                return(false);
            }

            String name = null;
            String type = p_intent._argv["p_type"];

            switch (type)
            {
            case "Pax4Object":
                name    = p_intent._argv["p_name"];
                p_state = new Pax4Object(name, parent0);
                return(true);

            case "Pax4Sprite":
                name    = p_intent._argv["p_name"];
                p_state = new Pax4Sprite(name, parent0);
                return(true);

            case "Pax4Slider":
                name    = p_intent._argv["p_name"];
                p_state = new Pax4Slider(name, parent0);
                return(true);

            default:
                return(PaxState.NewFactory(p_intent, out p_state));
            }
        }
Esempio n. 2
0
        public override void Exe(PaxIntent p_intent)
        {
            switch (p_intent._intent)
            {
            default:
                base.Exe(p_intent);
                break;
            }

            _skipUpdate = false;
        }
Esempio n. 3
0
        public bool ViewableTouched() //Touched Total Viewing Area
        {
            bool result = Pax4Touch._current._currentTouchState._xy.X >= _leftViewingThreshold &&
                          Pax4Touch._current._currentTouchState._xy.X <= _rightViewingThreshold &&
                          Pax4Touch._current._currentTouchState._xy.Y >= _topViewingThreshold &&
                          Pax4Touch._current._currentTouchState._xy.Y <= _bottomViewingThreshold;

            if (_isDesignMode && result)
            {
                //Send Intent
                PaxIntent intent = new PaxIntent();
                intent.SetPath(GetPath0());
                intent.SetIntent("SyncSerialize");
                intent.SetReturnIntent();
                intent._returnIntent.SetPath("localhost", "_root");
                PaxIntent.Enqueue(intent);
            }

            return(result);
        }
Esempio n. 4
0
 public override void Exe(PaxIntent p_intent)
 {
     base.Exe(p_intent);
     _skipUpdate = false;
 }