public void RewindProduction() { int startingDrillers = _f.GetComponent <DrillerCarrier>().GetDrillerCount(); _tm.Advance(Factory.STANDARD_TICKS_PER_PRODUCTION); _tm.Rewind(Factory.STANDARD_TICKS_PER_PRODUCTION); Assert.AreEqual(_f.GetComponent <DrillerCarrier>().GetDrillerCount(), startingDrillers); }
public void MiningCostIncreases() { _o1.GetComponent <DrillerCarrier>().AddDrillers(50); _o2.GetComponent <DrillerCarrier>().AddDrillers(50); DrillMineEvent drillFirstMine = new DrillMineEvent(_model1); DrillMineEvent drillSecondMine = new DrillMineEvent(_model2); _tm.AddEvent(drillFirstMine); _tm.AddEvent(drillSecondMine); _tm.Advance(20); Assert.IsTrue(drillFirstMine.WasEventSuccessful()); Assert.IsFalse(drillSecondMine.WasEventSuccessful()); _tm.Rewind(20); _o2.GetComponent <DrillerCarrier>().AddDrillers(100); _tm.Advance(20); Assert.IsTrue(drillSecondMine.WasEventSuccessful()); Assert.AreEqual(200, _o1.GetComponent <DrillerCarrier>().GetOwner().GetRequiredDrillersToMine()); }