Пример #1
0
        void Loaded()
        {
            playerDataStorage = Interface.Oxide.DataFileSystem.ReadObject <PlayerDataStorage>("HangulInput");

            cmd.AddChatCommand((string)Config["명령어"], this, "CommandToggle");

            //if (!string.IsNullOrEmpty((string)Config["메세지, 이전 명령어"]))
            //cmd.AddChatCommand("h", this, "CommandObsolete");
        }
    public static PlayerDataStorage LoadData()
    {
        int health = PlayerPrefs.GetInt("health");
        int xp     = PlayerPrefs.GetInt("xp");
        //  float x = PlayerPrefs.GetFloat("x");
        // float y = PlayerPrefs.GetFloat("y");
        // float z = PlayerPrefs.GetFloat("z");



        PlayerDataStorage dataStorage = new PlayerDataStorage()
        {
            HP = health,
            XP = xp,
        };

        return(dataStorage);
    }