| 1234567891011121314151617181920212223242526272829303132333435 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using TMPro;
- public class Spirits_Cook : MonoBehaviour
- {
- public GameObject attributeUpEffect;
- public float reductionDegree;
- public float reductionTime;
- private void OnTriggerEnter(Collider other)
- {
- if (other.gameObject.layer == 6 || other.gameObject.layer == 7)
- {
- MoveCharacter mc = other.GetComponentInParent<MoveCharacter>();
- if (!mc.isDamageReduction)
- {
- mc.DamageReductionStateOn(reductionDegree, attributeUpEffect);
- }
- }
- }
- private void OnTriggerExit(Collider other)
- {
- if (other.gameObject.layer == 6 || other.gameObject.layer == 7)
- {
- MoveCharacter mc = other.GetComponentInParent<MoveCharacter>();
- if (!mc.isDamageReduction)
- {
- mc.DamageReductionStateToOff(reductionTime);
- }
- }
- }
- }
|