Exemplo n.º 1
0
    public float setDamage(int argsInt, int argsCharaIndex)
    {
        //戻り値で経験値を返す
        grantExpChara.Add(argsCharaIndex);

        //defenceMagnification

        float tmpVal  = argsInt * defenceMagnification;
        int   calcVal = Mathf.RoundToInt(tmpVal);

        GameObject retObj = Instantiate(bitmapFontBasePrefab, this.transform.position, this.transform.rotation) as GameObject;

        retObj.GetComponentInChildren <common_damage> ().showDamage(this.transform, calcVal);

        thisEnemyStat.nowHP -= calcVal;

        if (thisEnemyStat.nowHP <= 0)
        {
            this.destoryF = true;

            gmS.grantExp_forAllChara(grantExpChara, thisEnemyStat.grantExp);

            sMB.playOneShotSound(enm_oneShotSound.attack03);

            Instantiate(removeEnemyPrefab, this.transform.position, Quaternion.identity);
            Destroy(this.gameObject);
            return(0);
        }
        else
        {
            sMB.playOneShotSound(enm_oneShotSound.enemyHit);
            hpBar.setHP(thisEnemyStat.nowHP);
            return(0);
        }
    }
Exemplo n.º 2
0
    public void testSEplay()
    {
        sndM = soundManagerGetter.getManager();

        int tmpNo = int.Parse(_SENumText.text);

        sndM.playOneShotSound((enm_oneShotSound)tmpNo);
    }
Exemplo n.º 3
0
    public void clickIcon()
    {
        tapSc.actionTapEffect();

        if (_thisIndex != fIC.selectedIconIndex)
        {
            //未選択から選択へ

            fIC.showSelectedCharaInfo(_thisIndex);
            charaDotScript.setAnimation(_thisIndex);
            sMB.playOneShotSound(enm_oneShotSound.nomalButton);

            return;
        }

        if (thisRockFlag == true)
        {
            //ロックされている場合は無視
            sMB.playOneShotSound(enm_oneShotSound.skillCancel);
            return;
        }

        sMB.playOneShotSound(enm_oneShotSound.nomalButton);

        if (thisSorityFlag)
        {
            //既に選択状態である
            thisSorityFlag = false;

            Color tmpC = new Color(0.3f, 0.3f, 0.3f);
            this.GetComponent <Image>().color = tmpC;
            checkIcon.sprite = _iconNoChecked;
        }
        else
        {
            // check off
            thisSorityFlag = true;

            Color tmpC = new Color(1f, 1f, 1f);
            this.GetComponent <Image>().color = tmpC;
            checkIcon.sprite = _iconChecked;
        }
    }
Exemplo n.º 4
0
    public void actionTapEffect()
    {
        if (waitTimeCor != null)
        {
            StopCoroutine(waitTimeCor);
            waitTimeCor = null;
        }
        if (_soundFlag)
        {
            if (_cancelButtonFlag)
            {
                sMB.playOneShotSound(enm_oneShotSound.closeButton);
            }
            else
            {
                sMB.playOneShotSound(enm_oneShotSound.nomalButton);
            }
        }

        waitTimeCor = StartCoroutine(pushThis());
    }
Exemplo n.º 5
0
    //
    //ダメージ処理
    public void setDamage(float argsInt)
    {
        GameObject retObj = Instantiate(bitmapFontBasePrefab, this.transform.position, this.transform.rotation) as GameObject;

        //
        //todo : 無敵時の挙動の実装
        if (thisCharaUnbreakable == true)
        {
            sMB.playOneShotSound(enm_oneShotSound.metal);
            return;
        }

        float damage = argsInt * thisChara.battleStatus.getDamage_CalCharaMode();

        if (thisChara.flyingFlag == true)
        {
            damage = damage * thisChara.flyingDefMagn;
        }

        // ここまでにダメージ計算
        retObj.GetComponentInChildren <common_damage> ().showDamage(this.transform, damage, Color.red);
        thisAnimeter.SetTrigger("gotoDamage");

        thisChara.nowHP -= damage;

        hpBar.setHP(thisChara.nowHP);

        if (thisChara.nowHP < 1)
        {
            this.destroyF = true;
            this.removedMe(this.transform);
        }
        else
        {
            sMB.playOneShotSound(enm_oneShotSound.playerDamage);
        }
    }
Exemplo n.º 6
0
	public void onTap_goNextPage(){
		tapedFlag = true;
		sMB.playOneShotSound (enm_oneShotSound.massegeNext);
	}