private void OnTriggerEnter(Collider other) { if (other.gameObject.CompareTag(TagCfg.SHIP)) { SceneGameObject sgo = other.gameObject.GetComponent <SceneGameObject>(); if (sgo != null) { sgo.SetDamage(rushPower, transform.position, this); OnRush(); } } }
private void OnTriggerEnter(Collider other) { if (other.gameObject.CompareTag(tagetTag)) { SceneGameObject sgo = other.gameObject.GetComponent <SceneGameObject>(); if (sgo != null) { sgo.SetDamage(power, transform.position, master); } Recycle(); } }