コード例 #1
0
    public static void Initialization()
    {
        XmlDocument doc      = GameRoot.gameResource.LoadResource_PublicXmlFile("GameOptions.xml");
        XmlNode     root     = doc.SelectSingleNode("GameOptions");
        XmlNode     node     = root.SelectSingleNode("GameInputMode");
        string      workMode = node.Attribute("mode");

        currentInputMode = InputInterface.InputModeStringToMode(workMode);
        inputDevice      = InputInterface.AllocInputInterface(currentInputMode);
        if (inputDevice == null)
        {
            throw new Exception("unknow input device!");
        }
        inputDevice.Initialization();

        InputDevice.AutoSleepTime_Player[0] = UniGameOptionsDefine.AutoSleepTime;
        InputDevice.AutoSleepTime_Player[1] = UniGameOptionsDefine.AutoSleepTime;
    }