123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212 |
- using System.Collections.Generic;
- using System;
- using UnityEngine;
- using Newtonsoft.Json;
- using Newtonsoft.Json.Converters;
- namespace DataTools
- {
- public enum GigType
- {
- Commerical,
- Sponsered,
- Photoshoot,
- FashionShow,
- GoSee,
- CastingCall,
- Interviews,
- Practice
- }
- [Serializable]
- public class Gig : DataObject
- {
- [JsonProperty]
- [SerializeField] private int duration;
- [JsonProperty]
- [SerializeField] private string location;
- [JsonProperty]
- [SerializeField] private string description;
- [JsonProperty]
- [SerializeField] private List<GigAction> actions;
- [JsonProperty]
- [SerializeField] private Currency currency;
- [JsonProperty]
- [SerializeField] private Chirp chirp;
- [JsonProperty]
- [SerializeField] private string conversation;
- [JsonProperty]
- [SerializeField]
- [JsonConverter(typeof(StringEnumConverter))]
- private GigType type;
- [JsonProperty]
- [SerializeField] private int starsNeeded;
- [JsonProperty]
- [SerializeField] private int starsEarned;
- public Gig(int duration, string location, List<GigAction> actions, Currency currency,
- Chirp chirp, string ConversationId, GigType gigtype, int starsNeeded, string Title)
- {
- this.duration = duration;
- this.location = location;
- this.actions = actions;
- this.currency = currency;
- this.chirp = chirp;
- this.conversation = ConversationId;
- this.type = gigtype;
- this.starsNeeded = starsNeeded;
- this.description = Title;
- }
- [JsonIgnore]
- public string Description
- {
- get
- {
- return description;
- }
- set
- {
- description = value;
- }
- }
-
- [JsonIgnore]
- public int Duration
- {
- get
- {
- return duration;
- }
- set
- {
- duration = value;
- }
- }
- [JsonIgnore]
- public string Location
- {
- get
- {
- return location;
- }
- set
- {
- location = value;
- }
- }
- [JsonIgnore]
- public List<GigAction> Actions
- {
- get
- {
- return actions;
- }
- set
- {
- actions = value;
- }
- }
- [JsonIgnore]
- public Currency Currency
- {
- get
- {
- return currency;
- }
- set
- {
- currency = value;
- }
- }
- [JsonIgnore]
- public Chirp Chirp
- {
- get
- {
- return chirp;
- }
- set
- {
- chirp = value;
- }
- }
- [JsonIgnore]
- public string Conversation
- {
- get
- {
- return conversation;
- }
- set
- {
- conversation = value;
- }
- }
- [JsonIgnore]
- public GigType Type
- {
- get
- {
- return type;
- }
- set
- {
- type = value;
- }
- }
- [JsonIgnore]
- public int StarsEarned
- {
- get
- {
- return starsEarned;
- }
- set
- {
- starsEarned = value;
- }
- }
- [JsonIgnore]
- public int StarsNeeded
- {
- get
- {
- return starsNeeded;
- }
- set
- {
- starsNeeded = value;
- }
- }
- public int GetTotalStars()
- {
- int stars = 0;
- foreach (GigAction action in actions)
- {
- stars += action.Stars;
- }
- return stars;
- }
- }
- }
|