Beispiel #1
0
        public void RaySpellEffect(RaySpell spell)
        {
            Vector3         direction  = Camera.main.transform.forward;
            Vector3         startPos   = Camera.main.transform.position + direction;
            GameObject      gameObj    = Instantiate(spell.projectilePrefab, startPos, Camera.main.transform.rotation);
            SpellProjectile projectile = gameObj.GetComponent <SpellProjectile>();

            projectile.InitProjectile(spell);
        }
Beispiel #2
0
 public void InitProjectile(RaySpell spell)
 {
     this.spell = spell;
 }