public Player(string clientName, int layer, PlayerType playerType, float FOVlength = 8.5f) : base(layer, "player_" + clientName, FOVlength) { //Inventory this.playerType = playerType; mouseSlot = new MouseSlot(layer + 11, clientName + "_mouseSlot"); SetupType(); }
public Player(SerializationInfo info, StreamingContext context) : base(info, context) { exp = info.GetInt32("exp"); freeStatPoints = info.GetInt32("freeStatPoints"); playerNameTitle = info.GetValue("playerNameTitle", typeof(TextGameObject)) as TextGameObject; playerType = (PlayerType)info.GetValue("playerType", typeof(PlayerType)); mouseSlot = info.TryGUIDThenFull <MouseSlot>(context, "mouseSlot"); }
public override void Replace(GameObject replacement) { if (mouseSlot != null && mouseSlot.GUID == replacement.GUID) { mouseSlot = replacement as MouseSlot; InitMouseSlot(); } base.Replace(replacement); }