public void TryTouch(GameObject Weapon) //接触攻撃 { if (GetWithEnemyState() == "Dizzying") //ピヨリならvore処理 { TryVore(Weapon); } else//それ以外はダメージ処理 { float KnockBackAmount = Weapon.GetComponent <ControllerWeapon>().KnockBackAmount; string KnockBackDirection = Weapon.GetComponent <ControllerWeapon>().Direction; ThisCharaGeneral.DamagedKnockBack(KnockBackAmount, KnockBackDirection);//ノックバックは先にしておく TryAddDamage(Weapon); AttackingEnemy = Weapon.GetComponent <ControllerWeapon>().GetBoss(); AttackingEnemy.GetComponent <ControllerEnemy>().InitTarget(); } }
public void TryAddDamage(GameObject Weapon) { int DamageAmount = Weapon.GetComponent <ControllerWeapon>().HitDamageAmount; float KnockBackAmount = Weapon.GetComponent <ControllerWeapon>().KnockBackAmount; string KnockBackDirection = Weapon.GetComponent <ControllerWeapon>().Direction; if (gameObject.transform.Find("Shield(Clone)")) { KnockBackAmount = 70; ThisCharaGeneral.DamagedKnockBack(KnockBackAmount, KnockBackDirection); } else { AddHitPoint(DamageAmount * -1); ThisCharaGeneral.DamagedKnockBack(KnockBackAmount, KnockBackDirection); } }