Example #1
0
	public void GetTotal(int userId, Coins.CoinsCallback callback) {
		GameJsonAuthConnection request = new GameJsonAuthConnection(
			Flow.URL_BASE + "login/items/get_user_coins.php", OnReceiveTotal);

			request.connect(
				(userId > 0)
					? new WWWForm().Add("user_id", userId)
					: new WWWForm().Add("_", "empty"),
				new CoinsConnection(userId, callback)
			);
	}
Example #2
0
        public void CreateCoins(Vector3 pos)
        {
            Vector3 startPos = pos + new Vector3(0.5f, -0.1f, 0.5f);
            Vector3 endPos   = pos + new Vector3(0.5f, 1.5f, 0.5f);

            Body coins = EntityFactory.CreateEntity <Body>("Coins", startPos);

            coins.AnimationQueue.Add(new EaseMotion(0.8f, coins.LocalTransform, endPos));
            Coins.Add(coins);
            AddBody(coins, false);
            SoundManager.PlaySound(ContentPaths.Audio.Oscar.sfx_ic_dwarf_stash_money, startPos);
            if (Faction != null)
            {
                Faction.World.ParticleManager.Trigger("puff", pos + new Vector3(0.5f, 1.5f, 0.5f), Color.White, 90);
            }
        }
        double GetMaturation(Coins coin)
        {
            double total = coin.TotalCoins;

            if (coin.MaturationType == EnumTypes.CoinsMaturityType.HalfMaturation.ToString())
            {
                total += (total * 0.50);
            }

            else if (coin.MaturationType == EnumTypes.CoinsMaturityType.FullMaturation.ToString())
            {
                total *= 2;
            }

            return(total);
        }
Example #4
0
 public void AddItemFila(string moeda, DateTime data_inicio, DateTime data_fim)
 {
     try
     {
         if (string.IsNullOrEmpty(moeda))
         {
             throw new HttpResponseException(Request.CreateErrorResponse(HttpStatusCode.NotFound, "Por favor insira o código da moeda."));
         }
         coin = new Coins(moeda, data_inicio, data_fim);
         CoinsRepository.CoinsList.Add(coin);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Example #5
0
 public RDeepBet(RDeepPlayer player, RDeepBetPosition betPosition, List <Coin> betCoins)
 {
     try
     {
         Player      = player;
         BetPosition = betPosition;
         BetCoins    = betCoins;
         Coins.SetBetStatus(betCoins, true);
         status = BetStatus.Placed;
     }
     catch (Exception e)
     {
         Coins.SetBetStatus(betCoins, false);
         throw e;
     }
 }
Example #6
0
        public void addCoin(Coins coin)
        {
            switch(coin)
            {
                case Coins.one: { _coinsBox.addOneRubleCoin(); }
                    break;
                case Coins.two: { _coinsBox.addTwoRubleCoin(); }
                    break;
                case Coins.five: { _coinsBox.addFiveRubleCoin(); }
                    break;
                case Coins.ten: { _coinsBox.addTenRubleCoin(); }
                    break;

            }
            deposit += (int)coin;
        }
Example #7
0
    void Start()
    {
        PlayerPrefs.SetInt("Helicoptero", 1);
        PlayerPrefs.SetInt("NyanCat", 1);
        coin = GameObject.FindGameObjectWithTag ("coin").GetComponent<Coins> ();

        if (coin.valor >= 1000) {
            textoHelicoptero.GetComponent<TextMesh>().text = "Comprado";
            textoHelicoptero.GetComponent<TextMesh>().fontSize = 30;
        }

        if (coin.valor >= 1500) {
            textoNyan.GetComponent<TextMesh>().text = "Comprado";
            textoNyan.GetComponent<TextMesh>().fontSize = 30;
        }
    }
        public override Coins[] FetchCoins(uint256[] txIds)
        {
            Coins[] coins      = new Coins[txIds.Length];
            int     i          = 0;
            int     notInCache = 0;

            foreach (var coin in _Uncommited.FetchCoins(txIds))
            {
                if (coin == null)
                {
                    notInCache++;
                }
                coins[i++] = coin;
            }

            uint256[] txIds2 = new uint256[notInCache];
            i = 0;
            for (int ii = 0; ii < txIds.Length; ii++)
            {
                if (coins[ii] == null)
                {
                    txIds2[i++] = txIds[ii];
                }
            }

            i = 0;
            foreach (var coin in Inner.FetchCoins(txIds2))
            {
                for (; i < coins.Length;)
                {
                    if (coins[i] == null)
                    {
                        break;
                    }
                    i++;
                }
                if (i >= coins.Length)
                {
                    break;
                }
                _Uncommited.SaveChange(txIds[i], coin);
                coins[i] = coin;
                i++;
            }
            return(coins);
        }
Example #9
0
    private void AddEntry(int value)
    {
        CoinsEntry ce = new CoinsEntry {
            value = value
        };

        string path       = Application.dataPath + "/Data/Coins.json";
        string jsonString = File.ReadAllText(path);

        Coins c = JsonUtility.FromJson <Coins>(jsonString);

        c.coins_list.Add(ce);

        string json = JsonUtility.ToJson(c);

        File.WriteAllText(path, json);
    }
Example #10
0
 public void Draw()
 {
     SpriteBatch.Begin();
     MiniCoin.Draw(SpriteBatch);
     MiniAvatar.Draw(SpriteBatch);
     SpriteBatch.DrawString(TextFont, "PLAYER", TopLeft, Color.Lerp(Color.White, Color.Transparent, .05f));
     SpriteBatch.DrawString(TextFont, PlayerName, TopLeft + new Vector2(Constants.ZERO, 25), Color.Lerp(Color.White, Color.Transparent, .05f));
     SpriteBatch.DrawString(TextFont, "SCORE", Top2ndRight, Color.Lerp(Color.White, Color.Transparent, .05f));
     SpriteBatch.DrawString(TextFont, Score.ToString(), Top2ndRight + new Vector2(Constants.ZERO, 25), Color.Lerp(Color.White, Color.Transparent, .05f));
     SpriteBatch.DrawString(TextFont, "LIVES", TopCenter, Color.Lerp(Color.White, Color.Transparent, .05f));
     SpriteBatch.DrawString(TextFont, Lives.ToString(), TopCenter + new Vector2(Constants.ZERO, 25), Color.Lerp(Color.White, Color.Transparent, .05f));
     SpriteBatch.DrawString(TextFont, "COINS", Top2ndLeft, Color.Lerp(Color.White, Color.Transparent, .05f));
     SpriteBatch.DrawString(TextFont, Coins.ToString(), Top2ndLeft + new Vector2(Constants.ZERO, 25), Color.Lerp(Color.White, Color.Transparent, .05f));
     SpriteBatch.DrawString(TextFont, "TIME", TopRight, Color.Lerp(Color.White, Color.Transparent, .05f));
     SpriteBatch.DrawString(TextFont, TimeRemaining.ToString(), TopRight + new Vector2(Constants.ZERO, 25), Color.Lerp(Color.White, Color.Transparent, .05f));
     SpriteBatch.End();
 }
Example #11
0
 public override CommonInterfaces.GameState Copy()
 {
     lock (this) {
         var gameState = new GameState();
         gameState.Players = Players.ConvertAll((p) => p.Copy());
         gameState.Coins   = Coins.ConvertAll((c) => c.Copy());
         gameState.Ghosts  = Ghosts.ConvertAll((g) => g.Copy());
         gameState.Walls   = Walls.ConvertAll((w) => w.Copy());
         gameState.Board   = Board.Copy();
         //last_inputs
         foreach (var input in lastInputs)
         {
             gameState.lastInputs.Add(input.Key, input.Value);
         }
         return(gameState);
     }
 }
Example #12
0
    void Update()
    {
        if (GameController.current.PlayerIsAlive)
        {
            //CRIACAO DA PLATAFORM INFINITA
            if (transform.position.x < point.position.x)
            {
                float Distace = Random.Range(distMin, disMax);

                int CoinsRandom = Random.Range(0, Coins.Count);


                transform.position = new Vector3(transform.position.x + Distace, Random.Range(0f, 1f), transform.position.z);

                Coin = Instantiate(Coins[CoinsRandom], transform.position, transform.rotation).GetComponent <Coins>();
            }
        }
    }
Example #13
0
 public override Coins[] FetchCoins(uint256[] txIds)
 {
     using (StopWatch.Instance.Start(o => PerformanceCounter.AddQueryTime(o)))
     {
         Coins[] result = new Coins[txIds.Length];
         using (var txx = _Engine.GetTransaction())
         {
             txx.ValuesLazyLoadingIsOn = false;
             int i = 0;
             foreach (var input in txIds)
             {
                 PerformanceCounter.AddQueriedEntities(1);
                 result[i++] = txx.Select <byte[], Coins>("Coins", input.ToBytes(false))?.Value;
             }
         }
         return(result);
     }
 }
Example #14
0
        public override Coins ScanCoins(uint256 txId, Transaction tx, int height)
        {
            Coins coin = null;

            foreach (var scanner in Scanners)
            {
                Coins localCoin = scanner.ScanCoins(txId, tx, height);
                if (coin == null)
                {
                    coin = localCoin;
                }
                else
                {
                    coin.MergeFrom(localCoin);
                }
            }
            return(coin);
        }
        public Coins ToCoins()
        {
            var coins = new Coins()
            {
                CoinBase  = this.IsCoinbase,
                Height    = this.Height,
                Version   = this.Version,
                CoinStake = this.IsCoinstake,
                Time      = this.Time
            };

            foreach (var output in this._Outputs)
            {
                coins.Outputs.Add(output == null ? Coins.NullTxOut : output);
            }
            coins.ClearUnspendable();
            return(coins);
        }
        // this turns the coin into monetary value
        public Coin(decimal CoinValue)
        {
            Coins castFromValue = (Coins)(CoinValue * 100);

            switch (castFromValue)
            {
            case Coins.PENNY:
            case Coins.NICKEL:
            case Coins.DIME:
            case Coins.QUARTER:
                userCoin = castFromValue;
                break;

            default:
                userCoin = Coins.COIN;
                break;
            }
        }
Example #17
0
        public void addCoin(Coins coin)
        {
            switch (coin)
            {
            case Coins.one: { _coinsBox.addOneRubleCoin(); }
            break;

            case Coins.two: { _coinsBox.addTwoRubleCoin(); }
            break;

            case Coins.five: { _coinsBox.addFiveRubleCoin(); }
            break;

            case Coins.ten: { _coinsBox.addTenRubleCoin(); }
            break;
            }
            deposit += (int)coin;
        }
 /// <summary>
 /// го поместува играчот во лево.
 /// </summary>
 public void moveLeft()
 {
     Character.UpdateCharacterImage();
     if (!endOfLevel)
     {
         if (!MoveBackground)
         {
             if (Character.X > 0)
             {
                 Character.X -= 5;
             }
         }
         else
         {
             if (!CanComeBack)
             {
                 if (counterComeBack <= 100)
                 {
                     counterComeBack++;
                     ComesBackToStart = true;
                     MoveBackground   = false;
                 }
                 else
                 {
                     Bckgr.startingX += 5;
                     Coins.Move("LEFT");
                     Bananas.Move("LEFT");
                 }
             }
             else
             {
                 ComesBackToStart = true;
                 MoveBackground   = false;
             }
         }
     }
     else
     {
         if (Character.X >= 30)
         {
             Character.X -= 5;
         }
     }
 }
Example #19
0
        public override string ToString()
        {
            var sb = new StringBuilder();

            if (Coins > 0u)
            {
                sb.Append($"$emotecoins {Coins.ToString()} ");
            }
            if (Tokens > 0u)
            {
                sb.Append($"$emotetokens {Tokens.ToString()} ");
            }
            if (Chests > 0u)
            {
                sb.Append($"$emotechest {Chests.ToString()} ");
            }
            if (Spheres > 0u)
            {
                sb.Append($"$emotesphere {Spheres.ToString()} ");
            }
            if (Capsules > 0u)
            {
                sb.Append($"$emotecapsule {Capsules.ToString()} ");
            }
            if (Tickets > 0u)
            {
                sb.Append($"$emoteticket {Tickets.ToString()} ");
            }
            if (BonusDoubleExp > 0u)
            {
                sb.Append($"$emote2exp {BonusDoubleExp.ToString()} ");
            }
            if (BonusBotRespect > 0u)
            {
                sb.Append($"$emoterespect {BonusBotRespect.ToString()} ");
            }
            if (BonusRewind > 0u)
            {
                sb.Append($"$emoterewind {BonusRewind.ToString()} ");
            }

            return(sb.ToString().TrimEnd());
        }
Example #20
0
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();

        if (!Application.isPlaying)
        {
            GUILayout.Label("Run the app to be enable running the coins");
            return;
        }

        Coins myScript = (Coins)target;

        GUILayout.Label("Is running: " + (myScript.isRunning? "true" : "false"));

        if (GUILayout.Button("Fire!"))
        {
            myScript.Fire();
        }
    }
Example #21
0
        public void NBitcoinDeserializeWithCoinsDeserializesObject()
        {
            var network = Network.RegTest;
            var genesis = network.GetGenesis();
            var coins   = new Coins(genesis.Transactions[0], 0);

            var result = (Coins)DBreezeSingleThreadSession.NBitcoinDeserialize(coins.ToBytes(), typeof(Coins));

            Assert.Equal(coins.Coinbase, result.Coinbase);
            Assert.Equal(coins.Height, result.Height);
            Assert.Equal(coins.IsEmpty, result.IsEmpty);
            Assert.Equal(coins.IsPruned, result.IsPruned);
            Assert.Equal(coins.Outputs.Count, result.Outputs.Count);
            Assert.Equal(coins.Outputs[0].ScriptPubKey.Hash, result.Outputs[0].ScriptPubKey.Hash);
            Assert.Equal(coins.Outputs[0].Value, result.Outputs[0].Value);
            Assert.Equal(coins.UnspentCount, result.UnspentCount);
            Assert.Equal(coins.Value, result.Value);
            Assert.Equal(coins.Version, result.Version);
        }
Example #22
0
 public HashrateMultiplierVM(IList <Coin> coins, string displayCoinAs)
 {
     Apply = new RelayCommand(ApplyCommand, Apply_CanExecute);
     this.DisplayCoinAs = displayCoinAs;
     this.Coins         = new ObservableCollection <CoinPlus>();
     Operation          = Operations[0];
     foreach (var coin in coins)
     {
         var coinPlus = new CoinPlus()
         {
             Coin       = coin,
             Multiplier = 1,
             Operation  = this.Operation,
             Result     = coin.Hashrate,
             Rounding   = RoundingOptions[0]
         };
         Coins.Add(coinPlus);
     }
 }
Example #23
0
        public void DeserializerWithCoinsDeserializesObject()
        {
            var network = Network.StratisRegTest;
            var genesis = network.GetGenesis();
            var coins   = new Coins(genesis.Transactions[0], 0);

            var result = (Coins)this.dbreezeSerializer.Deserializer(coins.ToBytes(), typeof(Coins));

            Assert.Equal(coins.CoinBase, result.CoinBase);
            Assert.Equal(coins.Height, result.Height);
            Assert.Equal(coins.IsEmpty, result.IsEmpty);
            Assert.Equal(coins.IsPruned, result.IsPruned);
            Assert.Equal(coins.Outputs.Count, result.Outputs.Count);
            Assert.Equal(coins.Outputs[0].ScriptPubKey.Hash, result.Outputs[0].ScriptPubKey.Hash);
            Assert.Equal(coins.Outputs[0].Value, result.Outputs[0].Value);
            Assert.Equal(coins.UnspentCount, result.UnspentCount);
            Assert.Equal(coins.Value, result.Value);
            Assert.Equal(coins.Version, result.Version);
        }
Example #24
0
 public ICoinsView Remove(SmartCoin coin)
 {
     lock (Lock)
     {
         var coinsToRemove = DescendantOfAndSelfNoLock(coin);
         foreach (var toRemove in coinsToRemove)
         {
             if (!Coins.Remove(toRemove))
             {
                 if (SpentCoins.Remove(toRemove))
                 {
                     // Clusters.Remove(toRemove);
                 }
             }
         }
         InvalidateSnapshot = true;
         return(coinsToRemove);
     }
 }
Example #25
0
    void KillEnemies(Vector2 start, Vector2 end)
    {
        Vector2 pos = transform.position;

        RaycastHit2D[] hits = Physics2D.RaycastAll(pos, (end - start).normalized,
                                                   (end - start).magnitude, LayerMask.GetMask("Enemy"));
        foreach (RaycastHit2D hit in hits)
        {
            if (hit.collider.gameObject.tag == "Enemy" ||
                hit.collider.gameObject.tag == "Boss")
            {
                int soundSwitch = UnityEngine.Random.Range(1, 4);
                switch (soundSwitch)
                {
                case (1): dio.clip = sword1; break;

                case (2): dio.clip = sword2; break;

                case (3): dio.clip = sword3; break;

                default: dio.clip = sword3; break;
                }

                dio.Play();
                if (hit.collider.gameObject.tag == "Boss")
                {
                    GameObject.Find("DemonKing").GetComponent <Boss>().Damage();
                }
                else
                {
                    ParticleSystem explode = hit.collider.gameObject.GetComponent <ParticleSystem>();
                    explode.Play();
                    hit.collider.gameObject.GetComponent <SpriteRenderer>().enabled = false;
                    float totalDuration = explode.duration + explode.startLifetime;
                    Destroy(hit.collider.gameObject.GetComponentInChildren <BoxCollider2D>());
                    Destroy(hit.collider.gameObject, totalDuration);
                }
                Coins coins = GameObject.FindGameObjectWithTag("Coins").GetComponent <Coins>();
                coins.tempCoins++;
                coins.coins++;
            }
        }
    }
        public static Awards LoadTestData(
            this Awards awards,
            Coins coins
            )
        {
            var rnd = new Random();

            foreach (var coin in coins)
            {
                awards.Add(
                    new Award()
                {
                    CoinRefId = coin.EntityRefId,
                    Value     = rnd.Next(2, 10),
                });
            }

            return(awards);
        }
Example #27
0
        public bool TryAdd(SmartCoin coin)
        {
            var added = false;

            lock (Lock)
            {
                if (!SpentCoins.Contains(coin))
                {
                    added = Coins.Add(coin);
                    coin.RegisterToHdPubKey();
                    if (added)
                    {
                        foreach (var outPoint in coin.Transaction.Transaction.Inputs.Select(x => x.PrevOut))
                        {
                            var newCoinSet = new HashSet <SmartCoin> {
                                coin
                            };

                            // If we don't succeed to add a new entry to the dictionary.
                            if (!CoinsByOutPoint.TryAdd(outPoint, newCoinSet))
                            {
                                var previousCoinTxId = CoinsByOutPoint[outPoint].First().TransactionId;

                                // Then check if we're in the same transaction as the previous coins in the dictionary are.
                                if (coin.TransactionId == previousCoinTxId)
                                {
                                    // If we are in the same transaction, then just add it to value set.
                                    CoinsByOutPoint[outPoint].Add(coin);
                                }
                                else
                                {
                                    // If we aren't in the same transaction, then it's a conflict, so replace the old set with the new one.
                                    CoinsByOutPoint[outPoint] = newCoinSet;
                                }
                            }
                        }
                        InvalidateSnapshot = true;
                    }
                }
            }
            return(added);
        }
        /// <summary>
        /// исцртување на главната панела (позадина, карактер, по потреба куршуми, непријатели, скорови ... итн)
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void MainForm_Paint(object sender, PaintEventArgs e)
        {
            e.Graphics.DrawImage(BckgrBitmap, Bckgr.startingX, 0, BckgrBitmap.Width, BckgrBitmap.Height);
            e.Graphics.DrawImage(Character.CurrentCharacterImage, Character.X, Character.Y);
            if (VisibleBullet)
            {
                BulletInjection.DrawInjection(e.Graphics);
            }
            MyEnemies.DrawEvilMinions(e.Graphics);
            Coins.Draw(e.Graphics);
            Bananas.Draw(e.Graphics);
            e.Graphics.DrawString("COINS: " + CollectedCoins.ToString(), font, brush, point);
            //e.Graphics.DrawString("FOOD: " + CollectedBananas.ToString(), font, brush, point2);
            this.DrawLifeAndKilledEM(e.Graphics);

            if (!VectorVillian.IsKilled && gamemode == GameMode.Hard)
            {
                VectorVillian.DrawVector(e.Graphics);
            }
        }
Example #29
0
    //public AudioSource playSound;

    void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }
        pooledObjects = new List <GameObject>();

        foreach (CoinsItems item in itemsToPool)
        {
            for (int i = 0; i < item.coinsAmount; i++)
            {
                GameObject obj = Instantiate(item.coinObject);
                obj.name             = item.name;
                obj.transform.parent = this.transform;
                obj.SetActive(false);
                pooledObjects.Add(obj);
            }
        }
    }
Example #30
0
        private void SettleBets()
        {
            foreach (RDeepPlayer player in boardPlayers)
            {
                foreach (RDeepBet bet in bets.Where(bet => bet.Player.ID == player.ID))
                {
                    Coins.SetBetStatus(bet.BetCoins, false);

                    int Factor = 1;

                    List <Coin> CoinsToDealer = new List <Coin>();
                    List <Coin> CoinsToPlayer = new List <Coin>();

                    if (bet.status == BetStatus.Won)
                    {
                        Factor = RDeepWiningNumbersList.BetPayOutFactorByBet(bet.BetPosition.betType);
                        foreach (IEnumerable <Coin> CoinsOfType in bet.BetCoins.GroupBy(coin => coin.CT))
                        {
                            CoinsToPlayer.AddRange(RDeepPlayer.TakeCoins(
                                                       boardDealer,
                                                       CoinsOfType.First().CT,
                                                       CoinsOfType.Count() * Factor));
                        }
                    }
                    else
                    {
                        CoinsToDealer.AddRange(bet.BetCoins);
                    }

                    if (CoinsToDealer.Count > 0)
                    {
                        RDeepPlayer.TransferCoins(bet.Player, boardDealer, CoinsToDealer);
                    }

                    if (CoinsToPlayer.Count > 0)
                    {
                        RDeepPlayer.TransferCoins(boardDealer, bet.Player, CoinsToPlayer);
                    }
                }
            }
        }
Example #31
0
 public void Spend(SmartCoin spentCoin)
 {
     lock (Lock)
     {
         if (Coins.Remove(spentCoin))
         {
             InvalidateSnapshot = true;
             SpentCoins.Add(spentCoin);
             var createdCoins = CreatedByNoLock(spentCoin.SpenderTransactionId);
             foreach (var newCoin in createdCoins)
             {
                 if (newCoin.AnonymitySet < PrivacyLevelThreshold)
                 {
                     spentCoin.Clusters.Merge(newCoin.Clusters);
                     newCoin.Clusters = spentCoin.Clusters;
                     ClustersByScriptPubKey.AddOrReplace(newCoin.ScriptPubKey, newCoin.Clusters);
                 }
             }
         }
     }
 }
Example #32
0
        public FetchCoinsResponse FetchCoins(OutPoint[] utxos)
        {
            FetchCoinsResponse res = new FetchCoinsResponse();

            using (new StopwatchDisposable(o => this.performanceCounter.AddQueryTime(o)))
            {
                this.performanceCounter.AddQueriedEntities(utxos.Length);

                foreach (OutPoint outPoint in utxos)
                {
                    byte[] row     = this.leveldb.Get(new byte[] { coinsTable }.Concat(outPoint.ToBytes()).ToArray());
                    Coins  outputs = row != null?this.dBreezeSerializer.Deserialize <Coins>(row) : null;

                    this.logger.LogTrace("Outputs for '{0}' were {1}.", outPoint, outputs == null ? "NOT loaded" : "loaded");

                    res.UnspentOutputs.Add(outPoint, new UnspentOutput(outPoint, outputs));
                }
            }

            return(res);
        }
Example #33
0
        public bool TryAdd(SmartCoin coin)
        {
            var added = false;

            lock (Lock)
            {
                if (!SpentCoins.Contains(coin))
                {
                    added = Coins.Add(coin);
                    if (added)
                    {
                        if (ClustersByScriptPubKey.TryGetValue(coin.ScriptPubKey, out var cluster))
                        {
                            coin.Clusters = cluster;
                        }
                        InvalidateSnapshot = true;
                    }
                }
            }
            return(added);
        }
Example #34
0
		public CoinsConnection(int userId, Coins.CoinsCallback callback)
		{
			this.callback = callback;
			this.userId = userId;
		}
Example #35
0
 public bool CoinToss(Coins selectCoin)
 {
     int coin;
     Random toss = new Random();
     if (Coins.Heads == selectCoin)
     {
         coin = 0;
     }
     else
     {
         coin = 1;
     }
     if (toss.Next(0, 2) == coin)
     {
         return true;
     }
     else
     {
         return false;
     }
 }
Example #36
0
 public void Shop()
 {
     coin = GameObject.FindGameObjectWithTag ("coin").GetComponent<Coins> ();
     SceneManager.LoadScene (1);
     coin.Cargar ();
 }
Example #37
0
 public void Back()
 {
     coin = GameObject.FindGameObjectWithTag ("coin").GetComponent<Coins> ();
     SceneManager.LoadScene(0);
     coin.Guardar ();
 }
Example #38
0
 // Use this for initialization
 void Start()
 {
     coin = GameObject.FindGameObjectWithTag("Check").GetComponent<Coins>();
 }
Example #39
0
    void Start()
    {
        m_Obstacle = GameObject.FindGameObjectWithTag("Obstaculos").GetComponent<RandomSpawn>();
        camara = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<MuscaJuego>();
        coin = GameObject.FindGameObjectWithTag ("coin").GetComponent<Coins> ();
        rigid = GetComponent<Rigidbody2D>();
        avion = gameObject;
        m_RandomNumber = Random.value;

        m_ADS.RequestInterstitial ();
        m_ADS.RequestRewardBasedVideo ();
    }