// helper function to spawn the skill effect on someone
 // (used by all the buff implementations and to load them after saving)
 public void SpawnEffect(Entity caster, Entity spawnTarget)
 {
     if (effect != null)
     {
         GameObject      go = Instantiate(effect.gameObject, spawnTarget.transform.position, Quaternion.identity);
         BuffSkillEffect effectComponent = go.GetComponent <BuffSkillEffect>();// tie this back in to my effect system?
         effectComponent.caster   = caster;
         effectComponent.target   = spawnTarget;
         effectComponent.buffName = name;
     }
 }
Exemple #2
0
 // helper function to spawn the skill effect on someone
 // (used by all the buff implementations and to load them after saving)
 public void SpawnEffect(Entity caster, Entity spawnTarget)
 {
     if (effect != null)
     {
         GameObject      go = Instantiate(effect.gameObject, spawnTarget.transform.position, Quaternion.identity);
         BuffSkillEffect effectComponent = go.GetComponent <BuffSkillEffect>();
         effectComponent.caster   = caster;
         effectComponent.target   = spawnTarget;
         effectComponent.buffName = name;
         NetworkServer.Spawn(go);
     }
 }