public void ExecuteRules()
    {
        ticks++;

        SimRule[] rules = unitType.rules;

        position.GetMapPosition(out context.mapPositionX, out context.mapPositionY);

        for (int i = 0; i < rules.Length; i++)
        {
            if (ticks % rules[i].rate == 0)
            {
                rules[i].Execute(context);
            }
        }
    }