示例#1
0
        public int GetResource(RTSUnit.Type type)
        {
            int value;

            if (!resources.TryGetValue(type, out value))
            {
                return(0);
            }
            return(value);
        }
示例#2
0
 public FindClosestUnit(RTSUnit.Type type)
 {
     this.type = type;
 }
示例#3
0
 public void AddResource(RTSUnit.Type type, int amount)
 {
     resources[type] = GetResource(type) + amount;
 }