public static void Main()
Console.WriteLine("Hello World");
ProxyGamePlayer proxyGamePlayer = new ProxyGamePlayer("Zhangsan");
proxyGamePlayer.Login("zhangsan","123");
proxyGamePlayer.KillBoss();
proxyGamePlayer.Upgrade();
public interface IGamePlayer
void Login(string user, string password);
public GamePlayer(ProxyGamePlayer proxyGamePlayer,string name)
if (proxyGamePlayer == null)
Console.WriteLine("You could not create role yourself");
public void Login(string user,string password)
Console.WriteLine(this.name + " has login.");
Console.WriteLine(this.name + "You have killed a boss.");
Console.WriteLine(this.name + "You have upgraded.");
public class ProxyGamePlayer
private GamePlayer player;
public ProxyGamePlayer(string name)
this.player = new GamePlayer(this,name);
public void Login(string user,string password)
this.player.Login(user,password);