public UtilModel(string token, string name, string description, string location, UtilType type) { _token = token; _name = name; _description = description; _location = location; _type = type; }
public UtilCounter GetCounter(UtilType type) { if (this._allCounters != null && this._allCounters.ContainsKey(type)) { return(this._allCounters[type]); } return(null); }
public AddUtilControlViewModel(UtilType utilType) { _type = utilType; _container = ServiceLocator.Current.GetInstance <IContainerExtension>(); _utilData = _container.Resolve <AppData>().UtilsData; _eventAggregator = ServiceLocator.Current.GetInstance <IEventAggregator>(); _addUtilEvent = _eventAggregator.GetEvent <AddUtilEvent>(); AddCommand = new DelegateCommand(Add, CanAdd); ScanCommand = new DelegateCommand(Scan); }
public GoldCounter(UtilType type) : base(type) { }
public ExpCounter(UtilType type) : base(type) { }
/// <summary> /// Sets the object with the path. /// </summary> /// <param name="_path">The _path.</param> public void SetObject(string _path) { bool found = false; foreach (TrapType type in Enum.GetValues(typeof(TrapType))) { if (ToDescriptionString(type) == _path) { trapType = type; found = true; break; } } if (!found) { foreach (BonusType type in Enum.GetValues(typeof(BonusType))) { if (ToDescriptionString(type) == _path) { bonusType = type; found = true; break; } } } if (!found) { foreach (UtilType type in Enum.GetValues(typeof(UtilType))) { if (ToDescriptionString(type) == _path) { utilType = type; break; } } } }
/// <summary> /// Gets the path of the utilities type. /// </summary> /// <param name="val">The value.</param> /// <returns></returns> public static string ToDescriptionString(UtilType val) { DescriptionAttribute[] attributes = (DescriptionAttribute[])val.GetType().GetField(val.ToString()).GetCustomAttributes(typeof(DescriptionAttribute), false); return attributes.Length > 0 ? attributes[0].Description : string.Empty; }
public TowerCounter(UtilType type) : base(type) { }
public UtilModel(string location, string description, UtilType type) { _location = location; _type = type; _description = description; }
public UtilCounter(UtilType type) { this._type = type; this._lookingTable = new Dictionary <int, CounterValue>(); }
public SkillCounter(UtilType type) : base(type) { }
public T GetComponent <T>() where T : instance_behaviour.Behaviour { return(GetComponent(UtilType.GetTypeName(typeof(T))) as T); }