Exemple #1
0
 void spawnNewProjectile()
 {
     projectile = (GameObject)Instantiate(ProjectilePrefab, transform.position, Quaternion.identity);
     projScript = projectile.GetComponent<IProjectile>();
     projScript.SetDamage(Damage, CritDamage);
     projScript.SetRange(Range, CritRange);
     projectile.transform.SetParent(transform);
     projectile.transform.localRotation = new Quaternion(0, 0, 0, 0);
 }