Пример #1
0
        public void Initialize(float radius, [CanBeNull] Table information, [NotNull] Ant creator)
        {
            if (creator == null)
            {
                throw new ArgumentNullException("creator");
            }
            if (radius <= 0)
            {
                throw new ArgumentOutOfRangeException("radius", radius, "The radius is less or equal to zero.");
            }

            _initialized = true;
            _radius      = radius;
            Information  = information;
            Creator      = creator;
            _age         = 0f;
            _maxAge      = MaxAge * MinSize / (MinSize + radius);
        }
Пример #2
0
 public void AddCarryingAnt(Ant ant)
 {
     _carryingAnts.Add(ant);
 }
Пример #3
0
 public void ExitView(Ant ant)
 {
     CallLuaFunction(antExitView, new AntTable(ant));
 }