コード例 #1
0
        public override void ToggleEnable()
        {
            base.ToggleEnable();

            if (enable)
            {
                Main.player[Main.myPlayer].GetModPlayer <RPGPlayer>().GetskillTree.ActiveClass = this;
            }
            else
            {
                Main.player[Main.myPlayer].GetModPlayer <RPGPlayer>().GetskillTree.ActiveClass = null;
            }

            RPGPlayer player = Main.player[Main.myPlayer].GetModPlayer <RPGPlayer>();


            UpdateClass();
            if (Main.netMode == NetmodeID.MultiplayerClient)
            {
                player.SendClientChanges(player);
            }
        }