示例#1
0
        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;
        }
示例#2
0
 private void SpawnPoisonAoe()
 {
     source.PlayOneShot(poisonSound);
     KingPoisonController.CreatePoisonAoe(poisonPrefab, GetRandomPosInRange(poisonAoeRange),
                                          Quaternion.Euler(0, 0, 0), poisonDamage, poisonActivationTime);
 }