Beispiel #1
0
 void OnTriggerEnter(Collider col)
 {
     if (col.GetComponent <Collider>().tag == "Player")
     {
         creditManager.AddCredit(creditAmount);
         soundEffectsManager.audioSource.PlayOneShot(creditPickupAudio, soundEffectsManager.audioSource.volume);
         Destroy(this.gameObject);
     }
 }
Beispiel #2
0
    public override void TakeHit(float _damage, Vector3 _hitPoint, Vector3 _hitDirection)
    {
        if (_damage >= currentHealth)
        {
            //Destroy(Instantiate(deathEffect.gameObject, _hitPoint, Quaternion.FromToRotation(Vector3.forward, _hitDirection)) as GameObject, deathEffect.main.startLifetimeMultiplier); // changed from deathEffect.startLifetime
            Instantiate(deathEffect.gameObject, transform.position, Quaternion.identity); // changed from deathEffect.startLifetime

            creditManager.AddCredit(destroyValue);
        }
        base.TakeHit(_damage, _hitPoint, _hitDirection);
    }
Beispiel #3
0
 public void TapPayoutButton()
 {
     if (Payout > 0)                                            //払い出しできるなら
     {
         CreditManagerInstance.AddCredit(Payout);               //クレジットに払い出し枚数を加算
         initPayout();                                          //払い出し枚数をリセット
         StockSensorManagerInstance.InactivateAllUpperSensor(); //UpperSensorの無効化
         StopperManagerInstance.InactivateAllStopper();         //ストッパー解除
         BingoMasuControllerInstance.ResetBingo();              //ビンゴをリセット
     }
 }
Beispiel #4
0
 public void OnCollisionEnter(Collision collision)
 {
     Destroy(collision.gameObject);            //衝突したコインオブジェクトを削除
     CreditManagerInsatance.AddCredit();       //CREDIT追加要求
     SoundManagerInstance.PlaySoundCoinFall(); //コイン落下時のSE再生
 }
Beispiel #5
0
 private void giveReward()
 {
     CreditManagerInstance.AddCredit(VALUE_REWARD_CREDIT);        //クレジットめっちゃ増やす
 }