Inheritance: MonoBehaviour
 public void CollectEnemies(float collection_time, EffectApplier s, GameObject e = null)
 {
     applier = s;
     start_collection = true;
     effect = e;
     Destroy(this, collection_time);
 }
 public void CollectEnemies(float collection_time, EffectApplier s)
 {
     applier = s;
     start_collection = true;
     StartCoroutine(ApplyEffectPerSec());
     Destroy(this, collection_time);
 }
 public void StartShoot(EffectApplier s, Vector3 pos, float speed, GameObject exp, float time)
 {
     explosion = exp;
     Destroy(gameObject, time);
     shoot_speed = speed;
     transform.LookAt(new Vector3(pos.x, pos.y, pos.z));
     start_detection = true;
     applier = s;
 }
Beispiel #4
0
        public int Run(uint nwnObjectId)
        {
            var listOfSubraceEffects = ResolveEffectsForObject(nwnObjectId);

            if (!listOfSubraceEffects.Any())
            {
                return(0);
            }

            EffectApplier.Apply(nwnObjectId, listOfSubraceEffects);

            return(0);
        }
        public IEffectApplier GetApplier(int time)
        {
            if (time > Duration * RepeatCount)
                time = Duration*RepeatCount;
            int cycleTime = time%Duration;
            int cycleCount = time/Duration;

            if (Reverse && cycleCount % 2 == 1)
                cycleTime = Duration - cycleTime - 1;
            EffectApplier effectApplier = new EffectApplier(this);
            effectApplier.Range = new TimeRange(cycleTime, Duration, cycleCount, Duration*RepeatCount);
            effectApplier.OrderingMin = Ordering.GetMin();
            effectApplier.OrderingSize = Ordering.GetMax() - Ordering.GetMin();

            return effectApplier;
        }