Example #1
0
    // 非ダメージ処理 + アイテム処理
    void OnTriggerEnter2D(Collider2D collider2D)
    {
        if (collider2D.gameObject.tag == "PlayerD_fromSt")
        {
            fromSt = true;
        }
        if (collider2D.gameObject.tag == "PlayerD_fromSp")
        {
            fromSp = true;
        }
        if (collider2D.gameObject.tag == "PlayerD_fromDef")
        {
            fromDef = true;
        }
        if (collider2D.gameObject.tag == "PlayerD_fromBom")
        {
            fromBom = true;
        }
        if (collider2D.gameObject.tag == "PlayerD_fromBominBom")
        {
            fromBominBom = true;
        }
        if (collider2D.gameObject.tag == "PlayerD_fromBoss")
        {
            fromBoss = true;
        }
        if (collider2D.gameObject.tag == "PlayerD_fromcircle")
        {
            fromBoss_circle = true;
        }

        // 回復処理
        if (collider2D.gameObject.tag == "heart")
        {
            characs.Item_heart();
            Instantiate(healEff, transform.position, Quaternion.Euler(0f, 0f, 0f));
        }
        // 攻撃速度アップ処理
        if (collider2D.gameObject.tag == "AttackSpeedUp")
        {
            characs.Item_ASUp_F();
            Instantiate(statusUPEff, transform.position, Quaternion.Euler(0f, 0f, 0f));
        }
        // 移動速度アップ処理
        if (collider2D.gameObject.tag == "MoveSpeedUp")
        {
            characs.Item_MSUp_F();
            Instantiate(statusUPEff, transform.position, Quaternion.Euler(0f, 0f, 0f));
        }
        // 攻撃力アップ処理
        if (collider2D.gameObject.tag == "AttackUp")
        {
            characs.Item_AUp_F();
            Instantiate(statusUPEff, transform.position, Quaternion.Euler(0f, 0f, 0f));
        }
    }