예제 #1
0
    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;
    }
예제 #2
0
 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;
     }
 }