/// <summary>
 /// Associate a bug with the test method.
 /// </summary>
 /// <param name="description">Description of the bug.</param>
 /// <param name="isFixed">
 /// A value indicating whether or not the bug has been fixed.
 /// </param>
 /// <returns>The DependencyPropertyTestMethod.</returns>
 public DependencyPropertyTestMethod Bug(string description, bool isFixed)
 {
     Bugs.Add(new BugAttribute(description)
     {
         Fixed = isFixed
     });
     return(this);
 }
        private Bug MakeBug(float posX, float posZ)
        {
            Bug b = Instantiate(mBug, new Vector3(posX, 0, posZ), Quaternion.Euler(0, 0, 0)).GetComponent <Bug>();

            Bugs.Add(b);
            b.Load();
            return(b);
        }
예제 #3
0
        public async void GetBugs()
        {
            AllBugs = await Repo.GetBugs();

            foreach (Bug bug in AllBugs)
            {
                Bugs.Add(bug);
            }
        }
        public void Load(Func <Vector3> getRandomPos, M.Random random)
        {
            mGetRandomPos = getRandomPos;
            mRandom       = random;

            for (int i = 0; i < mStartGenSize; i++)
            {
                Vector3 p = mGetRandomPos();
                Bugs.Add(MakeBug(p.x, p.z));
            }
        }
예제 #5
0
 /// <summary>
 /// Добавляет участника
 /// </summary>
 /// <param name="_bug"></param>
 /// <returns></returns>
 public static bool AddBug(Bug _bug)
 {
     try
     {
         Bugs.Add(_bug);//добавляем участника в коллекцию
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
예제 #6
0
        public void AddBug(IIssueFactory issueFactory, AddBugToTask command)
        {
            if (Status == IssueStatus.Done)
            {
                throw new CannotAddChildIssueWhenParentIssueIsDone <Task, ChildBug>(Id);
            }

            var bug = System.Threading.Tasks.Task.Run(() => issueFactory.GenerateChildBug(command)).GetAwaiter().GetResult();

            Bugs.Add(bug);
            Update(new BugAddedToTask(bug.Id, Id, ProjectId, bug.Title, bug.Description, bug.ReporterId, bug.AssigneeId, bug.Labels.Select(x => x.Id).ToList(), bug.CreatedAt));
        }
예제 #7
0
    public void AddBug(List <Bug> bugs)
    {
        foreach (Bug bug in bugs)
        {
            Bugs.Add(bug);
            CountBugs++;
            CountBirthBugs++;
            if (CountBirthBugs % (Data.BugCount * 10) == 0)
            {
                GenerationNumber++;
            }
        }

        bugs.Clear();
    }
 public void Update(GameTime gameTime, GraphicsDeviceManager graphics)
 {
     if (!Balls.Any())
     {
         Balls.Add(new Ball(new Vector2(132, 132), new Vector2(0f, 0f), 0, BallTextures[0], Color.White));
         Balls.Add(new Ball(new Vector2(232, 232), new Vector2(0f, 0f), 0, BallTextures[1], Color.White));
         Balls.Add(new Ball(new Vector2(332, 332), new Vector2(0f, 0f), 0, BallTextures[2], Color.White));
     }
     Bugs.ForEach(bug =>
     {
         if (bug.ExpireTime != TimeSpan.MinValue && bug.ExpireTime <= gameTime.TotalGameTime)
         {
             Bugs.Remove(bug);
         }
     });
     if (Bugs.Count < NumberOfSimultaneousBugs || InsanityMode)
     {
         Bugs.Add(new Bug(new Vector2(Utility.GetRandomInt(0, graphics.GraphicsDevice.Viewport.Width - BugTexture.Width),
                                      Utility.GetRandomInt(0, graphics.GraphicsDevice.Viewport.Height - BugTexture.Height)),
                          BugTexture, BugSquishedTexture, Color.White));
     }
     UpdateInput();
     UpdatePositions(gameTime, graphics);
 }
 /// <summary>
 /// Add bug to this project
 /// </summary>
 /// <param name="b"></param>
 public void AddBug(Bug b)
 {
     Bugs.Add(b);
 }
예제 #10
0
 /// <summary>
 /// Adds a bug to the bug cache.
 /// </summary>
 /// <param name="bug">The given bug.</param>
 public void Add(Bug bug) => Bugs.Add(bug);