Exemplo n.º 1
0
        void InitState()
        {
            activeness = StateList.Init("JB Activeness", Activeness_Inactive, Activeness_Active);
            gesture    = StateList.Init("JB Gesture", Gesture_NoHand, Gesture_Fist, Gesture_Open);

            activeness.StateChangedEvent += ActivenessChanged;
            gesture.StateChangedEvent    += GestureChanged;
        }
Exemplo n.º 2
0
 override protected void Start()
 {
     handCountState             = StateList.Init("JAE handCountState", JAX_NO_HANDS, JAX_HANDS);
     HandFacingInput.BoolEvent += FacingHandler;
     HandPumpToggle.BoolEvent  += HandlePumpToggle;
     Subscribe();
     frameEmitter.FrameEvent          += FrameEventHandler;
     handCountState.StateChangedEvent += HandCountStateChangeHandler;
 }
Exemplo n.º 3
0
 public StateChange(StateListItem fromS, StateListItem toS, StateList li, bool a)
 {
     if (fromS.name == "" || toS.name == "")
     {
         throw new Exception("cannot change to empty states");
     }
     fromState = fromS;
     toState   = toS;
     list      = li;
     allowed   = a;
 }
Exemplo n.º 4
0
        // Use this for initialization
        void Start()
        {
            FoundState = StateList.Init(FOUND_STATE_NAME, FOUND_STATE_NO_ID, FOUND_STATE_NOT_FOUND, FOUND_STATE_FOUND, FOUND_STATE_HAND_INVALID);
            FoundState.Change(!NoHandId ? FOUND_STATE_NOT_FOUND : FOUND_STATE_NO_ID);

            if (handIdInput)
            {
                handIdInput.IntEvent += HandleIntEvent;
            }

            FoundState.StateChangedEvent += HandleStateChangedEvent;
        }
Exemplo n.º 5
0
        public void InitArmHUDState()
        {
            //		handController = GameObject.FindObjectOfType<HandController> () as HandController;
            //		LookAtTarget = GameObject.Find ("OVRCameraRig") as GameObject;


            if (!StateList.HasList(STATE_NAME_ARMHUD))
            {
                InitArmHUDStateList();
            }
            ArmHUDState = new State(STATE_NAME_ARMHUD);
            ArmHUDState.StateChangedEvent += OnArmHUDStateChange;
            ArmHUDState.Change(ARMHUDSTATE_NOLEFTHAND);
        }
Exemplo n.º 6
0
 void InitArmHUDStateList()
 {
     if (!StateList.HasList(STATE_NAME_ARMHUD))
     {
         StateList.Create(
             STATE_NAME_ARMHUD,
             ARMHUDSTATE_START,
             ARMHUDSTATE_NOLEFTHAND,
             ARMHUDSTATE_STATUS_ETC,
             ARMHUDSTATE_SETTINGS_ONLY,
             ARMHUDSTATE_2HANDSEDIT,
             ARMHUDSTATE_PANELVISIBLE,
             ARMHUDSTATE_DROPPED
             );
     }
 }
Exemplo n.º 7
0
        // Use this for initialization
        #region loop
        void Start()
        {
            if (!TouchTracker)
            {
                TouchTracker = GetComponent <HandTouchTracker> ();
            }

            TouchTracker.HandleEnter += OnHandEnter;
            TouchTracker.HandleLeave += OnHandLeave;

            HandContactState = StateList.Init("TouchMap HandContactState", HCS_HAS_HAND, HCS_NOHAND);
            HandContactState.Change(HCS_NOHAND);
            HandContactState.StateChangedEvent += HandleHandContactStateChangedEvent;

            TouchingHand.HandEvent += HandleHandEvent;
            CursorFirstPosition     = Cursor.transform.position;
            handlerSet              = TryCPF();
        }
Exemplo n.º 8
0
 public StateListItem(string n, StateList l)
 {
     name = n;
     list = l;
 }
Exemplo n.º 9
0
 void InitState()
 {
     currentRegion = StateList.Init("StickyBool", Unknown, Top, Middle, Bottom);
     currentRegion.StateChangedEvent += HandleStateChangedEvent;
 }
Exemplo n.º 10
0
 public State(string name, string itemName)
 {
     list    = StateList.GetList(name);
     myState = list.Item(itemName);
 }
Exemplo n.º 11
0
 public State(string name)
 {
     list    = StateList.GetList(name);
     myState = list.First();
 }