コード例 #1
0
        static UserInputManager()
        {
            //Setup basic WASD controls
            var initialAxes = new Dictionary <string, float> {
                { "X", 0 },
                { "Z", 0 }
            };

            var weights = new Dictionary <Keys, Dictionary <string, float> >()
            {
                { Keys.KEY_D, new Dictionary <string, float> {
                      { "X", -1f }
                  } },
                { Keys.KEY_A, new Dictionary <string, float> {
                      { "X", 1f }
                  } },
                { Keys.KEY_W, new Dictionary <string, float> {
                      { "Z", -1f }
                  } },
                { Keys.KEY_S, new Dictionary <string, float> {
                      { "Z", 1f }
                  } },
            };

            mapping = new UserInputMapping(initialAxes, weights);
        }
コード例 #2
0
 public static void SetMapping(UserInputMapping mp)
 {
     mapping = mp;
 }