C# 变态 模拟游戏角色问题(本人菜鸟急!!!!!!!)
//好像你的难点在运算符重载上,以下是例子
//若还有其他问题请联系我
using System;
using System.Collections.Generic;
using System.Text;
namespace test2
{
class game_set
{
public static void main()
{
role liming = new role("法师");
role++;
}
}
class role
{
//内力上限、
//体力上限、
//经验值、
//剩余体力、
//剩余内力
public static role operator ++(role r)
{
role_show();
//内力上限
//体力上限
//经验值
//剩余体力
//剩余内力
role_show();
}
public static void role_show()
{
//show
}
}
}...
5578