public override void OnEvent(FauxWeaponHit evnt) { GameObject original = (GameObject)Resources.Load("CoopFauxWeapon", typeof(GameObject)); GameObject gameObject = (GameObject)UnityEngine.Object.Instantiate(original, evnt.Position, Quaternion.identity); gameObject.GetComponent <CoopFauxWeapon>().Damage = evnt.Damage; }
public override void OnEvent(FauxWeaponHit evnt) { if (this.ValidateSender(evnt, SenderTypes.Any)) { GameObject original = (GameObject)Resources.Load("CoopFauxWeapon", typeof(GameObject)); GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(original, evnt.Position, Quaternion.identity); gameObject.GetComponent <CoopFauxWeapon>().Damage = evnt.Damage; } }