Beispiel #1
0
        public override void OnStopInteracting(Projectile projectile)
        {
            //Allows projectile to keep refreshing with its own UpdatePosition method
            projectile.IsExternallyRefreshingPosition = false;

            //Reset physics variables to maintain its consistency after the tornado
            projectile.SetBasePosition();

            //Setup after-tornado behavior (if necessary)
            projectile.OnEndTornadoInteraction();

            //Makes it stop being manipulated by the tornado, allowing it to interact again if possible
            ModifiedProjectileList.Remove(projectile);
            tornadoInteraction.Remove(projectile);
        }
Beispiel #2
0
        public override bool CheckProjectileInteraction(Projectile projectile)
        {
            if (ModifiedProjectileList.Contains(projectile))
            {
                return(false);
            }

            OnInteract(projectile);
            ModifiedProjectileList.Add(projectile);

            projectile.OnExplodeAction += () =>
            {
                OnStopInteracting(projectile);
            };

            return(true);
        }