void Start() { MyPlayerAttributeAuthoringScript attributeAuthoringScript = GetComponent<MyPlayerAttributeAuthoringScript>(); // if (attributeAuthoringScript != null) // { attributeEntity = GetComponent<MyPlayerAttributeAuthoringScript>().attributeEntity; this.dstManager = GetComponent<MyPlayerAttributeAuthoringScript>().dstManager; // } ResetDamage(); m_Collider = GetComponent<Collider>(); }
public void ResetDamage() { MyPlayerAttributeAuthoringScript attributeAuthoringScript = GetComponent<MyPlayerAttributeAuthoringScript>(); var newAttributeEntity = attributeAuthoringScript.InitialiseAttributeEntity(dstManager); dstManager.DestroyEntity(this.attributeEntity); this.attributeEntity = newAttributeEntity; isInvulnerable = false; m_timeSinceLastHit = 0.0f; OnResetDamage.Invoke(); }