예제 #1
0
 void Start()
 {
     Player          = new Player(StateMachine);
     PeopleFactory   = new PeopleFactory(DataManager);
     GestureFactory  = new GestureFactory(Player, StateMachine);
     ScoreController = new ScoreController(UIController);
     GestureAdapter  = new GestureAdapter(FingersScript);
     InputController = new InputController(Camera, Player, GestureAdapter, StateMachine);
 }
예제 #2
0
 private void InitializeKinect()
 {
     try
     {
         Logger.InfoFormat("Initialize kinect");
         _kinectManager  = new KinectManager();
         _gestureFactory = new GestureFactory(_kinectManager);
         //_gestureFactory.GrabAndThrowLeftHanded += GrabAndThrowLeft;
         //_gestureFactory.GrabAndThrowRightHanded += GrabAndThrowRight;
         _gestureFactory.RightHandClosed        += RightHandClosed;
         _gestureFactory.LeftHandClosed         += LeftHandClosed;
         _gestureFactory.RightHandOpened        += RightHandOpened;
         _gestureFactory.LeftHandOpened         += LeftHandOpened;
         _kinectManager.TrackedBodyCountChanged += TrackedBodyCountChanged;
         Logger.InfoFormat("Kinect initialized with status: {0}", _kinectManager.Status);
     }
     catch (Exception eX)
     {
         Logger.ErrorFormat("Failed to start kinect: {0}", eX.Message);
     }
 }
    public void Setup()
    {
        if (CurrentGameState == GameState.Setup)
        {
            Player          = References.Player;
            GestureFactory  = References.GestureFactory;
            PeopleFactory   = References.PeopleFactory;
            DataManager     = References.DataManager;
            ScoreController = References.ScoreController;
            InputController = References.InputController;

            InputController.GestureList = GestureFactory.createGestureList();
            DataManager.Load();
            CurrentGuest = PeopleFactory.createRandom(ScoreController.GetCombo());
            ScoreController.PeopleList.Add(CurrentGuest);

            AnimationController.SetGuest(CurrentGuest.Type);

            CurrentGameState = GameState.ButtonClick;
        }
    }
예제 #4
0
 public void SetUp()
 {
     form = new GestureTestForm();
     form.Show();
     factory = new GestureFactory(this.form);
 }
예제 #5
0
 public GestureTestFactory()
 {
     this.button = new Button();
     this.form.Controls.Add(this.button);
     this.factory = new GestureFactory(this.form);
 }