protected float AddDamageProccess(PlayerStatus status, float dmg, bool isSlip = false) { if (dmg <= 0) { return(0); } //対象へダメージを与える float addDamage = status.AddDamage(dmg, GetWeaponName(), isSlip); //HITエフェクト if (hitEffect != null && !isSlip) { GameObject effectObj = PhotonNetwork.Instantiate(Common.Func.GetResourceEffect(hitEffect.name), myTran.position, hitEffect.transform.rotation, 0); EffectController effectCtrl = effectObj.GetComponent <EffectController>(); if (effectCtrl != null) { effectCtrl.EffectSetting(ownerTran, targetTran, weaponTran, false); } } //与えたダメージのログを保管 if (addDamage > 0 && ownerStatus != null) { ownerStatus.SetBattleLog(PlayerStatus.BATTLE_LOG_ATTACK, addDamage, GetWeaponName(), isSlip); } return(addDamage); }
private void DestroyProccess() { if (effectSpawn != null) { GameObject effectObj = PhotonNetwork.Instantiate(Common.Func.GetResourceEffect(effectSpawn.name), myTran.position, effectSpawn.transform.rotation, effectSpawnGroupId); EffectController efeCtrl = effectObj.GetComponent <EffectController>(); if (efeCtrl != null) { efeCtrl.EffectSetting(ownerTran, targetTran, weaponTran, isEffectCustom); } } PhotonNetwork.Destroy(gameObject); }