Esempio n. 1
0
        public Reward Generate(string name, string description, double price)
        {
            Reward reward = new InGameReward(name, price, description);

            reward.Activate();
            return(reward);
        }
Esempio n. 2
0
        private Reward ParseEntry(string entry)
        {
            Reward reward = EmptyReward();

            string[] fields = entry.Split(',');
            if (fields.Length >= 4)
            {
                string key         = fields[0].Trim();
                string name        = fields[1].Trim();
                double value       = double.Parse(fields[2]);
                string description = fields[3].Trim();

                reward = new InGameReward(name, value, description);
                reward.SetKey(key);
            }
            return(reward);
        }