public Player(Sfs2X.Entities.User user_, GameObject go_, int modelIdx_, UserProfile userProfile) { PlayerType pType = GetPlayerType(userProfile.GetField("permissionType")); Init(user_, go_, modelIdx_, pType, userProfile.UserID, userProfile.DisplayName, int.Parse((userProfile.TeamID == "" ? "0" : userProfile.TeamID))); ApplyAvatarOptions(userProfile); }
private void Init(Sfs2X.Entities.User user_, GameObject go_, int modelIdx_, PlayerType pType_, string parseId_, string displayName_, int teamID_) { user = user_; gameObject = go_; playerType = pType_; ModelIdx = modelIdx_; ParseId = (parseId_ == null) ? "" : parseId_; DisplayName = (displayName_ == null) ? "" : displayName_; TeamID = teamID_; InPrivateVolume = null; if (IsStealth) { ApplyAvatarOptions(GetAvatarOptionStr()); Visible = false; } if (CameraMoveManager.Enabled) { SetNameBillboardCam(CameraMoveManager.Inst.Cam); } sitController = new SitController(this); // Check hardware info for changes. if (IsLocal) { string oldHardwareInfo = CommunicationManager.CurrentUserProfile.GetLocalHardwareInfo(); CommunicationManager.CurrentUserProfile.UpdateLocalHardwareInfo(); // If user's hardware has changed, send the new info to Parse. if (oldHardwareInfo != CommunicationManager.CurrentUserProfile.GetLocalHardwareInfo()) { CommunicationManager.CurrentUserProfile.UpdateParseHardwareInfo(); } } }
public Player(Sfs2X.Entities.User user_, GameObject go_, PlayerInit init) { Init(user_, go_, init.modelIndex, init.ptype, init.parseID, init.displayName, init.teamID); }
} // End of boolean operator. public Player(Sfs2X.Entities.User user_, GameObject go_, int modelIdx_, PlayerType pType_, string parseId_, string displayName_, int teamID_) { Init(user_, go_, modelIdx_, pType_, parseId_, displayName_, teamID_); }