public static void CreatePoisonAoe(Object prefab, Vector3 pos, Quaternion rot, float damage, float activationTime) { GameObject obj = Instantiate(prefab, pos, rot) as GameObject; KingPoisonController kpc = obj.GetComponent <KingPoisonController>(); kpc.Damage = damage; kpc.DamageActivationTime = activationTime; }
private void SpawnPoisonAoe() { source.PlayOneShot(poisonSound); KingPoisonController.CreatePoisonAoe(poisonPrefab, GetRandomPosInRange(poisonAoeRange), Quaternion.Euler(0, 0, 0), poisonDamage, poisonActivationTime); }