Beispiel #1
0
        public bool execute()
        {
            var geoElement = Game.Instance.GameState.FindElement <GeoElement>(effect.ZoneId);
            var go         = new GameObject();
            var zc         = go.AddComponent <ZoneControl>();

            zc.zone           = geoElement.Geometries.Checked().FirstOrDefault();
            zc.loadOnExit     = Game.Instance.GameState.CurrentTarget;
            zc.transitionTime = effect.getTransitionTime();
            zc.zoneid         = geoElement.Id;

            Game.Instance.RunTarget(effect.getTargetId(), effect.getTransitionTime(), effect.getTransitionType());

            return(false);
        }
Beispiel #2
0
        public bool execute()
        {
            var geoElement = Game.Instance.GameState.FindElement <GeoElement>(effect.ZoneId);
            var go         = new GameObject();
            var zc         = go.AddComponent <ZoneControl>();

            zc.zone           = geoElement.Geometries.Checked().FirstOrDefault();
            zc.loadOnExit     = Game.Instance.GameState.CurrentTarget;
            zc.transitionTime = effect.getTransitionTime();
            zc.zoneid         = geoElement.Id;

            if (Application.isEditor && Application.isPlaying)
            {
                GeoExtension.Instance.Location = GeoExtension.Instance.Location; // This will activate debug location
            }

            Game.Instance.RunTarget(effect.getTargetId(), effect.getTransitionTime(), effect.getTransitionType());

            return(false);
        }