Ejemplo n.º 1
0
 public void RegisterProperty()
 {
     // Checking if the property gets registered correctly
     PropertyHandler.RegisterProperty("UnitTest", ref testProp);
     Assert.Contains("UnitTest", PropertyHandler.GetProperties().Keys);
     Assert.Throws(typeof(PropertyHandlerException),
                   () => PropertyHandler.RegisterProperty("UnitTest", ref testProp));
     _registerPropertyTestRan = true;
 }
Ejemplo n.º 2
0
 public void Register()
 {
     try
     {
         PropertyHandler.RegisterProperty($"{Name}.tickRate", ref tickRate);
     } catch (Exception)
     {
         App.Console?.Print($"Unable to register tickRate property for {Name} loop", Colors.Yellow);
     }
 }
Ejemplo n.º 3
0
        public static void Setup()
        {
            AlgorithmAStar.ClearCache();

            try
            {
                PropertyHandler.RegisterProperty("startingPrice", ref StartingPrice);
                PropertyHandler.RegisterProperty("pricePerKilometer", ref PricePerKilometer);
            }
            catch (Exception)
            {
                App.Console?.Print($"Unable to register properties for GPSSystem", Colors.Yellow);
            }
        }
Ejemplo n.º 4
0
 public CityController(City city)
 {
     City = city;
     PropertyHandler.RegisterProperty("customerSpawnRate", ref customerSpawnRate);
 }