void Spawn() { if (OrderInLayer == 0) { OrderInLayer = 999; } NetPlayer.Cmdspawn(MonsterToSpawn.MonsterNum, OrderInLayer, CanDodge, CanSpeedUp, CanDoubleDamage, CanAddLife, CanAddCaptureRate, CanChangeTurret, CanGuard, CanAvoidExplode); Player.Money -= MonsterToSpawn.cost; Player.AddedMoney += MonsterToSpawn.autoadd; Debug.Log("AddMoney" + Player.AddedMoney); OrderInLayer -= 1; }