/// <summary> /// 主角升级 /// </summary> /// <param name="cmd"></param> /// <returns></returns> public static bool Execute(UserLevelUpMapUserCmd_S cmd) { if(cmd.charid == ServerInfo.userdata.charid) { ServerInfo.level = cmd.level; MainRole.Instance.OnPropertyChanged("level"); return true; } return false; }
public static void Execute(UserLevelUpMapUserCmd_S cmd) { MainRole.Execute(cmd); var role = All[cmd.charid]; if(role == null) return; // 角色升级特效 GameApplication.PlayEffect("Prefabs/Models/Effect/shengji_sz", role.transform); }