예제 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Player"/> class.
        /// </summary>
        internal Player()
        {
            this.Home           = new Home();
            this.CommoditySlots = new CommoditySlots();

            // Apis

            this.Google     = new Google(this);
            this.Facebook   = new Facebook(this);
            this.Gamecenter = new Gamecenter(this);

            this.Arena = (ArenaData)CSV.Tables.Get(Gamefile.Arena).Datas[1];
        }
예제 #2
0
        public override void WriteJson(JsonWriter Writer, object Value, JsonSerializer Serializer)
        {
            CommoditySlots Slots = (CommoditySlots)Value;

            if (Slots != null)
            {
                Slots.Save().WriteTo(Writer);
            }
            else
            {
                Writer.WriteNull();
            }
        }
예제 #3
0
        public override object ReadJson(JsonReader Reader, Type ObjectType, object ExistingValue, JsonSerializer Serializer)
        {
            CommoditySlots Slots = (CommoditySlots)ExistingValue;

            if (Slots == null)
            {
                Slots = new CommoditySlots();
            }

            Slots.Load(JArray.Load(Reader));

            return(Slots);
        }
예제 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Player"/> class.
 /// </summary>
 public Player()
 {
     this.Home           = new Home();
     this.CommoditySlots = new CommoditySlots();
 }
예제 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Player"/> class.
 /// </summary>
 public Player()
 {
     this.Home           = new Home();
     this.CommoditySlots = new CommoditySlots();
     this.ApiManager     = new ApiManager();
 }