public void CancelTraining(int i)
    {
        StrategyObject u = trainingQueue[i];

        trainingQueue.Remove(u);
        if (i == 0)
        {
            Gameplay.getPlayer(tag).addSupply(u.cost);
            trainingStart = Time.time;
            if (trainingQueue.Count > 0)
            {
                startDevelopment(trainingQueue[0]);
            }
        }
        u.CancelDevelopment();
        Gameplay.getPlayer(tag).addResources(u.cost);

        RemoveCancelButton(i);
    }