コード例 #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
ファイル: AntScript.cs プロジェクト: JackTheRipper42/Ants
 public void ExitView(Ant ant)
 {
     CallLuaFunction(antExitView, new AntTable(ant));
 }