public static void AppendMissing_BaseStringAlreadyEndsWithStringToAppend_ReturnsBaseString() { // Arrange const string Base1 = " "; const string Base2 = " "; const string Base3 = " \r\n "; const string Base4 = "here is some\r\nmore text "; const string Base5 = "http://www.microsoft.com/"; // Act string actual1 = Base1.AppendMissing(" "); string actual2 = Base2.AppendMissing(" "); string actual3 = Base3.AppendMissing(" "); string actual4a = Base4.AppendMissing(" "); string actual4b = Base4.AppendMissing("more text "); string actual4c = Base4.AppendMissing("\r\nmore text "); string actual4d = Base4.AppendMissing("some\r\nmore text "); string actual5 = Base5.AppendMissing("/"); // Assert Assert.Equal(Base1, actual1); Assert.Equal(Base2, actual2); Assert.Equal(Base3, actual3); Assert.Equal(Base4, actual4a); Assert.Equal(Base4, actual4b); Assert.Equal(Base4, actual4c); Assert.Equal(Base4, actual4d); Assert.Equal(Base5, actual5); }
static void Main(string[] args) { bool baseFeature1a = new Base1().Feature1; // false bool baseFeature1b = (new Derived1() as Base1).Feature1; // true bool baseFeature2a = new Base1().Feature2; // false bool baseFeature2b = (new Derived1() as Base1).Feature2; // true }
protected override bool VerifyConfirmedLine(ScanHeader header, ScanLine line, Action rollbackAction, out WMSFlowStatus flowStatus) { if (!base.VerifyConfirmedLine(header, line, rollbackAction, out flowStatus)) { return(false); } if (header.Remove == true) { return(true); } var args = new WMSLineVerifyingArguments <Header, INTran>( (Header)HeaderView.Cache.GetMain(header), (INTran)LinesView.Cache.GetMain(line)); Base1.VerifyAvailability(args); if (args.Cancel) { flowStatus = WMSFlowStatus.Fail(args.ErrorInfo.MessageFormat, args.ErrorInfo.MessageArguments); rollbackAction(); args.Processed = true; SetScanState(MainCycleStartState); return(false); } flowStatus = WMSFlowStatus.Ok; return(true); }
public static void AppendMissing_BaseStringDoesNotEndWithStringToAppend_ReturnsBaseStringWithEndingStringAppended() { // Arrange const string Base1 = " "; const string Base2 = " "; const string Base3 = " \r\n "; const string Base4 = "here is some\r\nmore text"; const string Base5 = "http://www.microsoft.com"; const string Append1 = "."; const string Append2 = "%sometext#"; const string Append3a = "+_+"; const string Append3b = "\r\n"; const string Append4a = "y"; const string Append4b = "/"; const string Append5 = "/IMissVista-JustKidding"; // Act string actual1 = Base1.AppendMissing(Append1); string actual2 = Base2.AppendMissing(Append2); string actual3a = Base3.AppendMissing(Append3a); string actual3b = Base3.AppendMissing(Append3b); string actual4a = Base4.AppendMissing(Append4a); string actual4b = Base4.AppendMissing(Append4b); string actual5 = Base5.AppendMissing(Append5); // Assert Assert.Equal(Base1 + Append1, actual1); Assert.Equal(Base2 + Append2, actual2); Assert.Equal(Base3 + Append3a, actual3a); Assert.Equal(Base3 + Append3b, actual3b); Assert.Equal(Base4 + Append4a, actual4a); Assert.Equal(Base4 + Append4b, actual4b); Assert.Equal(Base5 + Append5, actual5); }
public static void AppendMissing_ParameterShouldEndWithIsNull_ThrowsArgumentNullException() { // Arrange const string Base1 = "some text"; // Act, Assert Assert.Throws <ArgumentNullException>(() => Base1.AppendMissing(null)); }
static void Main(string[] args) { Base1 b = new Base1(); b.Execute(); b = new Derived1(); b.Execute(); }
public virtual void dataSourceFieldSelecting(PXFieldSelectingEventArgs e, string field) { RMReport report = (RMReport)e.Row; RMDataSource dataSource = report != null?Base.DataSourceByID.Select(report.DataSourceID) : null; if (dataSource == null) { object defValue; if (Base.DataSourceByID.Cache.RaiseFieldDefaulting(field, null, out defValue)) { Base.DataSourceByID.Cache.RaiseFieldUpdating(field, null, ref defValue); } Base.DataSourceByID.Cache.RaiseFieldSelecting(field, null, ref defValue, true); e.ReturnState = defValue; } else { e.ReturnState = Base.DataSourceByID.Cache.GetStateExt(dataSource, field); } //Fix AmountType Combo for PM: if (report != null && report.Type == RMType.PM && field.Equals(typeof(RMDataSource.amountType).Name, StringComparison.InvariantCultureIgnoreCase)) { e.ReturnState = PXIntState.CreateInstance(e.ReturnValue, field, false, 0, null, null, new int[] { BalanceType.NotSet, BalanceType.Amount, BalanceType.Quantity, BalanceType.TurnoverAmount, BalanceType.TurnoverQuantity, BalanceType.BudgetAmount, BalanceType.BudgetQuantity, BalanceType.RevisedAmount, BalanceType.RevisedQuantity, BalanceType.OriginalCommittedAmount, BalanceType.OriginalCommittedQuantity, BalanceType.CommittedAmount, BalanceType.CommittedQuantity, BalanceType.CommittedOpenAmount, BalanceType.CommittedOpenQuantity, BalanceType.CommittedReceivedQuantity, BalanceType.CommittedInvoicedAmount, BalanceType.CommittedInvoicedQuantity }, new string[] { Messages.GetLocal(Messages.NotSet), Messages.GetLocal(Messages.ActualAmount), Messages.GetLocal(Messages.ActualQuantity), Messages.GetLocal(Messages.AmountTurnover), Messages.GetLocal(Messages.QuantityTurnover), Messages.GetLocal(Messages.BudgetAmount), Messages.GetLocal(Messages.BudgetQuantity), Messages.GetLocal(Messages.RevisedAmount), Messages.GetLocal(Messages.RevisedQuantity), Messages.GetLocal(Messages.OriginalCommittedAmount), Messages.GetLocal(Messages.OriginalCommittedQuantity), Messages.GetLocal(Messages.CommittedAmount), Messages.GetLocal(Messages.CommittedQuantity), Messages.GetLocal(Messages.CommittedOpenAmount), Messages.GetLocal(Messages.CommittedOpenQuantity), Messages.GetLocal(Messages.CommittedReceivedQuantity), Messages.GetLocal(Messages.CommittedInvoicedAmount), Messages.GetLocal(Messages.CommittedInvoicedQuantity) }, typeof(short), 0); ((PXFieldState)e.ReturnState).DisplayName = Messages.GetLocal(Messages.AmountType); } Base1.dataSourceFieldSelecting(e, field); if (e.ReturnState is PXFieldState) { ((PXFieldState)e.ReturnState).SetFieldName("DataSource" + field); ((PXFieldState)e.ReturnState).Visible = Base.IsFieldVisible(field, report); } }
public IEnumerable subcontracts() { var subcontracts = Base1.pOOrderslist().Cast <POOrderRS>() .Where(x => x.OrderType == POOrderType.RegularSubcontract); foreach (var subcontract in subcontracts) { var extension = PXCache <POOrderRS> .GetExtension <PoOrderRsExt>(subcontract); extension.ProjectCD = GetSubcontractProjectName(subcontract); yield return(subcontract); } }
public virtual void OnWaitEnd(PXLongRunStatus status, INRegister primaryRow, Action <PXLongRunStatus, INRegister> baseImpl) { if (IsCartRequired) { Base1.OnWaitEnd(status, primaryRow?.Released == true, INScanTransfer.Msg.DocumentIsReleased, null, INScanTransfer.Msg.DocumentReleaseFailed, ScanStates.ToLocation); } else { baseImpl(status, primaryRow); } }
public static void Main() { Derived1 d1 = new Derived1(); d1.Prop = 7; Console.WriteLine(d1); Base1 b1 = new Base1(); Console.WriteLine(b1); Derived2 d2 = new Derived2(); Base2 b2 = new Base2(); d2.SetTheDude(77); Console.WriteLine(d2.GetTheDude()); }
// Use this for initialization void Start() { exController = new ExcavatorController(); ArmAHinge = ArmA.GetComponent <HingeJoint>(); ArmBHinge = ArmB.GetComponent <HingeJoint>(); BucketHinge = BucketMain.GetComponent <HingeJoint>(); Base1Hinge = Base1.GetComponent <HingeJoint>(); rotateArmA = 0f; rotateArmB = 0f; rotateBucketMain = 0f; rotateBase1 = 0f; rotationSpeed = 0.5f; driveMode = false; }
private void Start() { ArmAHinge = ArmA.GetComponent <HingeJoint>(); ArmBHinge = ArmB.GetComponent <HingeJoint>(); BucketHinge = BucketMain.GetComponent <HingeJoint>(); Base1Hinge = Base1.GetComponent <HingeJoint>(); rotateArmA = 0f; rotateArmB = 0f; rotateBucketMain = 0f; rotateBase1 = 0f; GameObject exControllerScript = GameObject.Find("Excavator"); driveController = exControllerScript.GetComponent <CarController>(); _netMqListener = new NetMqListener(HandleMessage); _netMqListener.Start(); }
public void TestCtorMemberName() { var b1 = new Base1(null); Assert.NotNull(b1, "b1"); Assert.AreEqual(1, b1.ctor(), "b1.ctor()"); Assert.AreEqual(2, b1.Ctor(), "b1.Ctor()"); var b2 = new Base2(null); Assert.NotNull(b2, "b2"); Assert.AreEqual(1, b2.ctor, "b2.ctor"); Assert.AreEqual(2, b2.Ctor, "b2.Ctor"); var ctor = 3; Assert.AreEqual(3, ctor, "var ctor"); }
// Use this for initialization void Start() { ArmAHinge = ArmA.GetComponent <HingeJoint>(); ArmBHinge = ArmB.GetComponent <HingeJoint>(); BucketHinge = BucketMain.GetComponent <HingeJoint>(); Base1Hinge = Base1.GetComponent <HingeJoint>(); rotateArmA = 0f; rotateArmB = 0f; rotateBucketMain = 0f; rotateBase1 = 0f; GameObject clientScript = GameObject.Find("ExcavatorV2Simple"); //pt = pipeThreadScript.GetComponent<PipeThreadingOnlyJoysticks>(); co = clientScript.GetComponent <ClientObject>(); GameObject exControllerScript = GameObject.Find("Excavator"); driveController = exControllerScript.GetComponent <CarController>(); xyArray = new string[6]; }
public virtual CommitTaxRequest BuildCommitTaxRequestWithFrt(ARInvoice invoice) { if (invoice == null) { throw new PXArgumentException(nameof(invoice), ErrorMessages.ArgumentNullException); } Customer cust = (Customer)Base.customer.View.SelectSingleBound(new object[] { invoice }); CR.Location loc = (CR.Location)Base.location.View.SelectSingleBound(new object[] { invoice }); CommitTaxRequest request = new CommitTaxRequest(); request.CompanyCode = Base1.CompanyCodeFromBranch(invoice.TaxZoneID, invoice.BranchID); request.CurrencyCode = invoice.CuryID; request.CustomerCode = cust.AcctCD; request.TaxRegistrationID = loc?.TaxRegistrationID; IAddressBase fromAddress = Base1.GetFromAddress(invoice); IAddressBase toAddress = Base1.GetToAddress(invoice); if (fromAddress == null) { throw new PXException(Messages.FailedGetFrom); } if (toAddress == null) { throw new PXException(Messages.FailedGetTo); } request.OriginAddress = AddressConverter.ConvertTaxAddress(fromAddress); request.DestinationAddress = AddressConverter.ConvertTaxAddress(toAddress); request.DocCode = $"AR.{invoice.DocType}.{invoice.RefNbr}"; request.DocDate = invoice.DocDate.GetValueOrDefault(); request.LocationCode = GetExternalTaxProviderLocationCode <ARTran, ARTran.FK.Invoice.SameAsCurrent, ARTran.siteID>(invoice); request.CustomerUsageType = invoice.AvalaraCustomerUsageType; if (!string.IsNullOrEmpty(invoice.ExternalTaxExemptionNumber)) { request.ExemptionNo = invoice.ExternalTaxExemptionNumber; } request.DocType = Base1.GetTaxDocumentType(invoice); Sign sign = Base1.GetDocumentSign(invoice); PXSelectBase <ARTran> select = new PXSelectJoin <ARTran, LeftJoin <InventoryItem, On <InventoryItem.inventoryID, Equal <ARTran.inventoryID> >, LeftJoin <Account, On <Account.accountID, Equal <ARTran.accountID> > > >, Where <ARTran.tranType, Equal <Current <ARInvoice.docType> >, And <ARTran.refNbr, Equal <Current <ARInvoice.refNbr> >, And <Where <ARTran.lineType, NotEqual <SOLineType.discount>, Or <ARTran.lineType, IsNull> > > > >, OrderBy <Asc <ARTran.tranType, Asc <ARTran.refNbr, Asc <ARTran.lineNbr> > > > >(Base); request.Discount = Base.Document.Current.CuryDiscTot.GetValueOrDefault(); DateTime?taxDate = invoice.OrigDocDate; bool applyRetainage = Base.ARSetup.Current?.RetainTaxes != true && invoice.IsOriginalRetainageDocument(); /// <summary> /// Add the following condition and logic per Jira [IP-23] /// </summary>> string taxCategory = (Base as SOInvoiceEntry).FreightDetails.Current?.TaxCategoryID; if (invoice.CuryFreightTot > 0 && GL.Branch.PK.Find(Base, Base.Accessinfo.BranchID).CountryID == Country_US && invoice.TaxZoneID == TaxCloud && !string.IsNullOrEmpty(taxCategory)) { var line = new TaxCartItem(); line.Index = short.MinValue; line.Quantity = 1; line.UOM = "EA"; line.Amount = sign * invoice.CuryFreightTot.GetValueOrDefault(); line.Description = PXMessages.LocalizeNoPrefix(SO.Messages.FreightDesc); line.DestinationAddress = request.DestinationAddress; line.OriginAddress = request.OriginAddress; line.ItemCode = "N/A"; line.Discounted = false; line.TaxCode = taxCategory; request.CartItems.Add(line); } foreach (PXResult <ARTran, InventoryItem, Account> res in select.View.SelectMultiBound(new object[] { invoice })) { ARTran tran = (ARTran)res; InventoryItem item = (InventoryItem)res; Account salesAccount = (Account)res; var line = new TaxCartItem(); line.Index = tran.LineNbr ?? 0; line.Amount = sign * (tran.CuryTranAmt.GetValueOrDefault() + (applyRetainage ? tran.CuryRetainageAmt.GetValueOrDefault() : 0m)); line.Description = tran.TranDesc; line.DestinationAddress = AddressConverter.ConvertTaxAddress(Base1.GetToAddress(invoice, tran)); line.OriginAddress = AddressConverter.ConvertTaxAddress(Base1.GetFromAddress(invoice, tran)); line.ItemCode = item.InventoryCD; line.Quantity = Math.Abs(tran.Qty.GetValueOrDefault()); line.UOM = tran.UOM; line.Discounted = tran.LineType != SOLineType.Freight && request.Discount > 0; line.RevAcct = salesAccount.AccountCD; line.TaxCode = tran.TaxCategoryID; line.CustomerUsageType = tran.AvalaraCustomerUsageType; if (tran.OrigInvoiceDate != null) { taxDate = tran.OrigInvoiceDate; } request.CartItems.Add(line); } if (applyRetainage) { var line = new TaxCartItem(); line.Index = invoice.LineCntr.GetValueOrDefault() + 1; line.Amount = Sign.Minus * sign * invoice.CuryLineRetainageTotal.GetValueOrDefault(); line.Description = PXMessages.LocalizeFormatNoPrefix(AP.Messages.RetainageForTransactionDescription, GetLabel.For <ARDocType>(invoice.DocType), invoice.RefNbr); line.DestinationAddress = request.DestinationAddress; line.OriginAddress = request.OriginAddress; line.ItemCode = "Retainage"; line.Discounted = false; line.NonTaxable = true; request.CartItems.Add(line); } if ((invoice.DocType == ARDocType.CreditMemo || invoice.DocType == ARDocType.CashReturn) && invoice.OrigDocDate != null) { request.TaxOverride.Reason = Messages.ReturnReason; request.TaxOverride.TaxDate = taxDate.Value; request.TaxOverride.TaxOverrideType = TaxOverrideType.TaxDate; sign = Sign.Minus; } return(request); }
protected GetTaxRequest BuildGetTaxRequestWithFRTCate <TLineAmt, TLineQty, TDocDiscount>(SOOrder order, string docCode, string debugMethodName) where TLineAmt : IBqlField where TLineQty : IBqlField where TDocDiscount : IBqlField { Stopwatch sw = new Stopwatch(); sw.Start(); Debug.Indent(); if (order == null) { throw new PXArgumentException(nameof(order)); } Customer cust = (Customer)Base.customer.View.SelectSingleBound(new object[] { order }); Location loc = (Location)Base.location.View.SelectSingleBound(new object[] { order }); IAddressBase fromAddress = GetFromAddress(order); IAddressBase toAddress = GetToAddress(order); Debug.Print($"{DateTime.Now.TimeOfDay} Select Customer, Location, Addresses in {sw.ElapsedMilliseconds} millisec"); if (fromAddress == null) { throw new PXException(Messages.FailedGetFromAddressSO); } if (toAddress == null) { throw new PXException(Messages.FailedGetToAddressSO); } GetTaxRequest request = new GetTaxRequest(); request.CompanyCode = Base1.CompanyCodeFromBranch(order.TaxZoneID, order.BranchID); request.CurrencyCode = order.CuryID; request.CustomerCode = cust.AcctCD; request.TaxRegistrationID = loc?.TaxRegistrationID; request.OriginAddress = AddressConverter.ConvertTaxAddress(fromAddress); request.DestinationAddress = AddressConverter.ConvertTaxAddress(toAddress); request.DocCode = docCode; request.DocDate = order.OrderDate.GetValueOrDefault(); request.LocationCode = GetExternalTaxProviderLocationCode <SOLine, SOLine.FK.Order.SameAsCurrent, SOLine.siteID>(order); Sign docSign = Sign.Plus; request.CustomerUsageType = order.AvalaraCustomerUsageType; if (!string.IsNullOrEmpty(order.ExternalTaxExemptionNumber)) { request.ExemptionNo = order.ExternalTaxExemptionNumber; } SOOrderType orderType = (SOOrderType)Base.soordertype.View.SelectSingleBound(new object[] { order }); if (orderType.DefaultOperation == SOOperation.Receipt) { request.DocType = TaxDocumentType.ReturnOrder; docSign = Sign.Minus; } else { request.DocType = TaxDocumentType.SalesOrder; } PXSelectBase <SOLine> select = new PXSelectJoin <SOLine, LeftJoin <InventoryItem, On <SOLine.FK.InventoryItem>, LeftJoin <Account, On <Account.accountID, Equal <SOLine.salesAcctID> > > >, Where <SOLine.orderType, Equal <Current <SOOrder.orderType> >, And <SOLine.orderNbr, Equal <Current <SOOrder.orderNbr> > > >, OrderBy <Asc <SOLine.orderType, Asc <SOLine.orderNbr, Asc <SOLine.lineNbr> > > > >(Base); PXCache documentCache = Base.Caches[typeof(SOOrder)]; request.Discount = (documentCache.GetValue <TDocDiscount>(order) as decimal?) ?? 0m; Stopwatch sw2 = new Stopwatch(); sw2.Start(); // Add additional condition to skip the calculation including the freight amount. Per YJ's request. if (order.CuryFreightTot > 0 && !string.IsNullOrEmpty(order.FreightTaxCategoryID)) { var line = new TaxCartItem(); line.Index = short.MinValue; line.Quantity = 1; line.UOM = "EA"; line.Amount = docSign * order.CuryFreightTot.GetValueOrDefault(); line.Description = PXMessages.LocalizeNoPrefix(Messages.FreightDesc); line.DestinationAddress = request.DestinationAddress; line.OriginAddress = request.OriginAddress; line.ItemCode = "N/A"; line.Discounted = false; line.TaxCode = order.FreightTaxCategoryID; request.CartItems.Add(line); } PXCache lineCache = Base.Caches[typeof(SOLine)]; foreach (PXResult <SOLine, InventoryItem, Account> res in select.View.SelectMultiBound(new object[] { order })) { SOLine tran = (SOLine)res; InventoryItem item = (InventoryItem)res; Account salesAccount = (Account)res; bool lineIsDiscounted = request.Discount > 0m && ((tran.DocumentDiscountRate ?? 1m) != 1m || (tran.GroupDiscountRate ?? 1m) != 1m); var line = new TaxCartItem(); line.Index = tran.LineNbr ?? 0; decimal lineAmount = (lineCache.GetValue <TLineAmt>(tran) as decimal?) ?? 0m; decimal lineQty = (lineCache.GetValue <TLineQty>(tran) as decimal?) ?? 0m; line.Amount = orderType.DefaultOperation != tran.Operation ? Sign.Minus * docSign * lineAmount : docSign * lineAmount; line.Description = tran.TranDesc; line.DestinationAddress = AddressConverter.ConvertTaxAddress(Base1.GetToAddress(order, tran)); line.OriginAddress = AddressConverter.ConvertTaxAddress(Base1.GetFromAddress(order, tran)); line.ItemCode = item.InventoryCD; line.Quantity = Math.Abs(lineQty); line.UOM = tran.UOM; line.Discounted = lineIsDiscounted; line.RevAcct = salesAccount.AccountCD; line.TaxCode = tran.TaxCategoryID; line.CustomerUsageType = tran.AvalaraCustomerUsageType; if (tran.Operation == SOOperation.Receipt && tran.InvoiceDate != null) { line.TaxOverride.Reason = Messages.ReturnReason; line.TaxOverride.TaxDate = tran.InvoiceDate.Value; line.TaxOverride.TaxOverrideType = TaxOverrideType.TaxDate; } request.CartItems.Add(line); } sw2.Stop(); Debug.Print($"{DateTime.Now.TimeOfDay} Select detail lines in {sw2.ElapsedMilliseconds} millisec."); Debug.Unindent(); sw.Stop(); Debug.Print($"{DateTime.Now.TimeOfDay} {debugMethodName}() in {sw.ElapsedMilliseconds} millisec."); return(request); }
public IEnumerable poOrdersList() { return(Base1.pOOrderslist().Cast <POOrderRS>() .Where(po => po.OrderType != POOrderType.RegularSubcontract)); }
protected override WMSFlowStatus ExecuteAndCompleteFlow(Func <WMSFlowStatus> func) => Base1.ExecuteAndCompleteFlow(func);
protected override INCart ReadCartByBarcode(string barcode) => Base1.ReadCartByBarcode(barcode);
protected override void Prompt(string promptMsg, params object[] args) => Base1.Prompt(promptMsg, args);
protected override void Report(string infoMsg, params object[] args) => Base1.Report(infoMsg, args);
protected override void SetScanState(string state) => Base1.SetScanState(state);
protected override void ClearHeaderInfo() => Base1.ClearHeaderInfo();
protected override void ProcessToLocationBarcode(string barcode) => Base1.ProcessToLocationBarcode(barcode);
IEnumerator SpawnCD() { yield return(new WaitForSeconds(SpawnTimer)); if (wave == 1 && k == 0) { dead = 0; StartWave.SetActive(true); yield return(new WaitForSeconds(1)); sec--; yield return(new WaitForSeconds(1)); sec--; yield return(new WaitForSeconds(1)); StartWave.SetActive(false); sec = 3; yield return(new WaitForSeconds(0.5f)); nextwave.SetActive(true); yield return(new WaitForSeconds(2)); nextwave.SetActive(false); } switch (wave) { case 1: spawnmob = 6; if (dead < spawnmob) { for (int i = 0; i < 4; i++) { int number1 = Random.Range(0, 8); int Enemyn = Random.Range(1, 4); if (Enemyn == 1) { Instantiate(Enemy1, spawnPos[number1].position, Quaternion.identity); } if (Enemyn == 2) { Instantiate(Enemy2, spawnPos[number1].position, Quaternion.identity); } if (Enemyn == 3) { Instantiate(Enemy3, spawnPos[number1].position, Quaternion.identity); } yield return(new WaitForSeconds(0.3f)); } } if (dead >= spawnmob) { do { yield return(new WaitForSeconds(2f)); } while (dead != k); wave++; nextwave.SetActive(true); yield return(new WaitForSeconds(2)); nextwave.SetActive(false); k = 0; PlayerPrefs.SetInt("kolvo", k); Enemy.dead = 0; spawnmob = 10; break; } break; case 2: if (dead < spawnmob) { for (int i = 0; i < 4; i++) { int number1 = Random.Range(0, 8); int Enemyn = Random.Range(1, 4); if (Enemyn == 1) { Instantiate(Enemy1, spawnPos[number1].position, Quaternion.identity); } if (Enemyn == 2) { Instantiate(Enemy2, spawnPos[number1].position, Quaternion.identity); } if (Enemyn == 3) { Instantiate(Enemy3, spawnPos[number1].position, Quaternion.identity); } yield return(new WaitForSeconds(0.3f)); } } if (dead >= spawnmob) { do { yield return(new WaitForSeconds(2f)); } while (dead != k); wave++; nextwave.SetActive(true); yield return(new WaitForSeconds(2)); nextwave.SetActive(false); k = 0; PlayerPrefs.SetInt("kolvo", k); Enemy.dead = 0; spawnmob = 12; } break; case 3: if (dead < spawnmob) { for (int i = 0; i < 4; i++) { int number1 = Random.Range(0, 8); int Enemyn = Random.Range(1, 4); if (Enemyn == 1) { Instantiate(Enemy1, spawnPos[number1].position, Quaternion.identity); } if (Enemyn == 2) { Instantiate(Enemy2, spawnPos[number1].position, Quaternion.identity); } if (Enemyn == 3) { Instantiate(Enemy3, spawnPos[number1].position, Quaternion.identity); } yield return(new WaitForSeconds(0.3f)); } } if (dead >= spawnmob) { do { yield return(new WaitForSeconds(2f)); } while (dead != k); wave++; k = 0; PlayerPrefs.SetInt("kolvo", k); Enemy.dead = 0; compl.SetActive(true); yield return(new WaitForSeconds(2)); compl.SetActive(false); Teleport1.SetActive(true); StopCoroutine(SpawnCD()); break; } break; } if (wave < 4) { Repeat(); } else { wave = 0; Base.SetActive(true); Base1.SetActive(false); spawner.SetActive(false); } }
protected override void ReportError(string errorMsg, params object[] args) => Base1.ReportError(errorMsg, args);
static void Main(string[] args) { bool baseFeature1 = new Base1().Feature1; // false // the overriden Feature1 has precedence. bool baseFeature1b = (new Derived1() as Base1).Feature1; // true }