Esempio n. 1
0
        public static GameObject Instantiate(ENTITY e)
        {
            GameObject  instantiated = new GameObject(e.Classname);
            PlayerSpawn script       = instantiated.AddComponent <PlayerSpawn>();

            script.Name = e.GetPropertyValue("Name");
            if (script.Name.Equals(string.Empty))
            {
                Debug.LogWarning("Found player_spawn without name! Please set name in Torii.");
            }

            script.ExcludeFromRandomSpawns = e.GetSpawnflagValue(0, 2);
            script.ForceSpawnOnDayOne      = e.GetSpawnflagValue(1, 2);

            EntityUtil.SetInstantiatedObjectTransform(e, ref instantiated);

            DreamDirector.PlayerSpawns.Add(script);
            if (script.ForceSpawnOnDayOne)             // player spawn should be forced if it's day 1
            {
                DreamDirector.PlayerSpawnForced = true;
                DreamDirector.ForcedSpawnIndex  = DreamDirector.PlayerSpawns.Count - 1;
            }

            return(instantiated);
        }
Esempio n. 2
0
        public static GameObject Instantiate(ENTITY e)
        {
            GameObject  instantiated = new GameObject(e.Classname);
            TriggerLink script       = instantiated.AddComponent <TriggerLink>();

            script.ForceFadeColor      = e.GetSpawnflagValue(0, 4);
            script.LinkToSpecificLevel = e.GetSpawnflagValue(1, 4);
            script.ForceSpawnPoint     = e.GetSpawnflagValue(2, 4);
            script.PlayLinkSound       = e.GetSpawnflagValue(3, 4);

            if (script.LinkToSpecificLevel)
            {
                script.LinkedLevel = IOUtil.PathCombine("levels", e.GetPropertyValue("Linked level"));
            }
            if (script.ForceFadeColor)
            {
                script.ForcedLinkColor = EntityUtil.TryParseColor("Forced link color", e);
            }
            if (script.ForceSpawnPoint)
            {
                script.SpawnPointName = e.GetPropertyValue("Spawn point name");
            }

            EntityUtil.SetInstantiatedObjectTransform(e, ref instantiated);

            instantiated.AddComponent <BoxCollider>().isTrigger = true;

            return(instantiated);
        }
        public frmLISTAPRECIOS(ENTITY.USUARIO oUSUARIO)
        {
            InitializeComponent();

            cPRODUCTO = CONTROLADORA.cPRODUCTO.ObtenerInstancia();
            cCATEGORIA_PRODUCTOS = CONTROLADORA.cCATEGORIA_PRODUCTOS.ObtenerInstancia();
        }
Esempio n. 4
0
        private float _GetImperil(ENTITY entity_type)
        {
            float imperil;

            _EntityImperils.TryGetValue(entity_type, out imperil);
            return(imperil);
        }
Esempio n. 5
0
        public static GameObject Instantiate(ENTITY e)
        {
            GameObject      instantiated = new GameObject(e.Classname);
            TriggerTeleport script       = instantiated.AddComponent <TriggerTeleport>();

            script.TargetName = e.GetPropertyValue("Target name");
            if (script.TargetName.Equals(string.Empty))
            {
                Debug.LogWarning("Trigger_teleport has no target, please fix in Torii!");
            }

            script.FadeOnTeleport = e.GetSpawnflagValue(0, 1);

            if (script.FadeOnTeleport)
            {
                script.FadeColor   = EntityUtil.TryParseColor("Fade color", e);
                script.FadeInTime  = EntityUtil.TryParseFloat("Fade in time", e);
                script.FadeOutTime = EntityUtil.TryParseFloat("Fade out time", e);
            }

            EntityUtil.SetInstantiatedObjectTransform(e, ref instantiated);

            instantiated.AddComponent <BoxCollider>().isTrigger = true;

            return(instantiated);
        }
Esempio n. 6
0
        public static GameObject Instantiate(ENTITY e)
        {
            GameObject        instantiated = new GameObject(e.Classname);
            AudioSourceObject script       = instantiated.AddComponent <AudioSourceObject>();

            script.Source = instantiated.AddComponent <AudioSource>();

            script.AudioClip   = e.GetPropertyValue("Audio clip");
            script.MinDistance = EntityUtil.TryParseFloat("Min distance", e);

            script.LoopAudio = e.GetSpawnflagValue(0, 1);

            if (script.LoopAudio)
            {
                script.LoopDelay = EntityUtil.TryParseFloat("Loop delay", e);
            }

            script.Source.loop                  = script.LoopAudio;
            script.Source.minDistance           = script.MinDistance;
            script.Source.spatialBlend          = 1;    // 3D audio
            script.Source.outputAudioMixerGroup = _masterMixer.FindMatchingGroups("SFX")[0];

            EntityUtil.SetInstantiatedObjectTransform(e, ref instantiated);

            script.StartCoroutine(IOUtil.LoadOGGIntoSource(IOUtil.PathCombine("sfx", script.AudioClip), script.Source));

            return(instantiated);
        }
Esempio n. 7
0
 /// <summary>
 /// Will declare an entity in a container with a specific name and visibility
 /// </summary>
 /// <param name="to_declare">Type of the entity to declare</param>
 /// <param name="containerID">Identifier of the container in which declare the entity</param>
 /// <param name="name">Name of the declared entity</param>
 /// <param name="visibility">Visibility of the declared entity</param>
 /// <returns>Identifier of the freshly declared entity</returns>
 public UInt32 Declare(ENTITY to_declare, UInt32 containerID, string name, VISIBILITY visibility)
 {
     if (declarators.ContainsKey(to_declare))
     {
         return(declarators[to_declare].Invoke(this, containerID, name, visibility));
     }
     throw new KeyNotFoundException("No such declarator for ENTITY: " + to_declare.ToString());
 }
 public FieldWisdom(ENTITY[] types, Entity owner, IMapGate gate, IMapFinder finder)
 {
     _Ids = new Queue<Guid>();
     _Types = types;
     _Owner = owner;
     _Gate = gate;
     _Finder = finder;
 }
 public static bool IsWall(ENTITY e)
 {
     return e == Data.ENTITY.WALL_EAST || e == Data.ENTITY.WALL_EAST_AISLE
         || e == Data.ENTITY.WALL_NORTH|| e == Data.ENTITY.WALL_NORTH_AISLE
         || e == Data.ENTITY.WALL_SOUTH|| e == Data.ENTITY.WALL_SOUTH_AISLE
         || e == Data.ENTITY.WALL_WESTERN|| e == Data.ENTITY.WALL_WESTERN_AISLE
         || e == Data.ENTITY.WALL_GATE || e == Data.ENTITY.CHEST_GATE || e == Data.ENTITY.STATIC;
 }
Esempio n. 10
0
 public static bool IsWall(ENTITY e)
 {
     return(e == Data.ENTITY.WALL_EAST || e == Data.ENTITY.WALL_EAST_AISLE ||
            e == Data.ENTITY.WALL_NORTH || e == Data.ENTITY.WALL_NORTH_AISLE ||
            e == Data.ENTITY.WALL_SOUTH || e == Data.ENTITY.WALL_SOUTH_AISLE ||
            e == Data.ENTITY.WALL_WESTERN || e == Data.ENTITY.WALL_WESTERN_AISLE ||
            e == Data.ENTITY.WALL_GATE || e == Data.ENTITY.CHEST_GATE || e == Data.ENTITY.STATIC);
 }
Esempio n. 11
0
        private IEnumerable <IVisible> _FindCompanion(ENTITY type, IEnumerable <IVisible> field_of_vision)
        {
            var companions = from vis in field_of_vision where vis.EntityType == type select vis;

            return(from companion in companions
                   from value in _Actors.Values
                   where companion.Id == value.Id select companion);
        }
 public void SetCurrentEntity(ENTITY troop)
 {
     if (troop != ENTITY.None)
     {
         //_levelController.EnableSpawnableCellsShader();
     }
     currentEntitySelected = troop;
 }
 public static Entity Create(ENTITY entity_type, Vector2 position, float direction)
 {
     var entity = Create(entity_type);
     IIndividual individual = entity;
     individual.SetPosition(position);
     individual.AddDirection(direction);
     return entity;
 }
Esempio n. 14
0
    public static void SkyDive()
    {
        int     ped = PLAYER.PLAYER_PED_ID();
        Vector3 vec = ENTITY.GET_ENTITY_COORDS(ped, true);

        ENTITY.SET_ENTITY_COORDS(ped, vec.X, vec.Y, 2500f, true, true, true, true);
        AI.TASK_SKY_DIVE(ped);
    }
 public StrongholdWisdom(ENTITY[] entitys, IIndividual player, IMapGate gate, IMapFinder finder)
 {
     _Ids = new Queue<Guid>();
     _Entitys = entitys;
     _Player = player;
     _Gate = gate;
     _Finder = finder;
 }
 public PortalWisdom(Entity entity, string target_realm, ENTITY[] pass_entity, IMapGate gate, IMapFinder finder)
 {
     _Entity = entity;
     _TargetRealm = target_realm;
     _PassEntity = pass_entity;
     _Gate = gate;
     _Finder = finder;
 }
        public frmEXPORTARPRODUCTO(ENTITY.USUARIO oUSU)
        {
            InitializeComponent();

            oUSUARIO = oUSU;
            cPRODUCTO = CONTROLADORA.cPRODUCTO.ObtenerInstancia();
            cCATEGORIA_PRODUCTOS = CONTROLADORA.cCATEGORIA_PRODUCTOS.ObtenerInstancia();
        }
Esempio n. 18
0
        public static Entity Create(ENTITY entity_type, Vector2 position, float direction)
        {
            var         entity     = Create(entity_type);
            IIndividual individual = entity;

            individual.SetPosition(position);
            individual.AddDirection(direction);
            return(entity);
        }
Esempio n. 19
0
File: Entity.cs Progetto: wico-/Code
 public Entity(Rectangle boundary, string fileName, ENTITY type)
     : base(boundary, fileName, type)
 {
     this.position.X = boundary.X;
     this.position.Y = boundary.Y;
     this.boundary = boundary;
     this.fileName = fileName;
     this.type = type;
 }
Esempio n. 20
0
 public static void NoDamage(int entity)
 {
     ENTITY.SET_ENTITY_PROOFS(entity, true, true, true, true, true, true, true, true);
     ENTITY.SET_ENTITY_INVINCIBLE(entity, true);
     ENTITY.SET_ENTITY_CAN_BE_DAMAGED(entity, false);
     VEHICLE.SET_VEHICLE_STRONG(entity, true);
     VEHICLE.SET_VEHICLE_TYRES_CAN_BURST(entity, true);
     VEHICLE.SET_VEHICLE_WHEELS_CAN_BREAK(entity, true);
 }
Esempio n. 21
0
File: Entity.cs Progetto: wico-/Code
 public Entity(Rectangle boundary, Texture2D texture, ENTITY type)
     : base(boundary, texture.Name.ToString(), type)
 {
     this.position.X = boundary.X;
     this.position.Y = boundary.Y;
     this.boundary = boundary;
     this.fileName = texture.Name.ToString();
     this.type = type;
     this.texture = texture;
 }
Esempio n. 22
0
 public frmAYUDA(ENTITY.USUARIO oUSUARIO)
 {
     InitializeComponent();
     this.Text = String.Format("About {0}", AssemblyTitle);
     this.labelProductName.Text = AssemblyProduct;
     this.labelVersion.Text = String.Format("Version {0}", AssemblyVersion);
     this.labelCopyright.Text = AssemblyCopyright;
     this.labelCompanyName.Text = AssemblyCompany;
     this.textBoxDescription.Text = AssemblyDescription;
 }
Esempio n. 23
0
        public static GameObject Instantiate(ENTITY e)
        {
            GameObject  instantiated = new GameObject(e.Classname);
            ModelObject script       = instantiated.AddComponent <ModelObject>();

            script.ModelSrc     = e.GetPropertyValue("Model src");
            script.LinkedLevel  = e.GetPropertyValue("Linked level");
            script.AudioClip    = e.GetPropertyValue("Audio clip");
            script.MinDistance  = EntityUtil.TryParseFloat("Min distance", e);
            script.SequenceName = e.GetPropertyValue("Sequence name");

            script.ForceFadeColor      = e.GetSpawnflagValue(0, 6);
            script.LinkToSpecificLevel = e.GetSpawnflagValue(1, 6);
            script.DisableLinking      = e.GetSpawnflagValue(2, 6);
            script.IsSolid             = e.GetSpawnflagValue(3, 6);
            script.PlayAudio           = e.GetSpawnflagValue(4, 6);
            script.HasActionSequence   = e.GetSpawnflagValue(5, 6);

            GameObject meshObject = IOUtil.LoadObject(script.ModelSrc, script.IsSolid, ResourceLifespan.LEVEL);

            meshObject.transform.SetParent(instantiated.transform);

            script.Source              = instantiated.AddComponent <AudioSource>();
            script.Source.playOnAwake  = false;
            script.Source.loop         = false;
            script.Source.spatialBlend = 1;             // 3D audio
            script.Source.minDistance  = script.MinDistance;

            if (!script.DisableLinking)
            {
                MeshCollider[] colliders = instantiated.GetComponentsInChildren <MeshCollider>();
                foreach (MeshCollider c in colliders)
                {
                    c.gameObject.tag = "Linkable";
                }
            }

            if (script.ForceFadeColor)
            {
                script.FadeColor = EntityUtil.TryParseColor("Fade color", e);
            }
            if (script.PlayAudio)
            {
                script.StartCoroutine(IOUtil.LoadOGGIntoSource(IOUtil.PathCombine("sfx", script.AudioClip), script.Source));
                script.LoopDelay = EntityUtil.TryParseFloat("Loop delay", e);
            }
            if (script.HasActionSequence)
            {
                DreamDirector.PostLoadEvent += script.PostLoad;
            }

            EntityUtil.SetInstantiatedObjectTransform(e, ref instantiated);

            return(instantiated);
        }
Esempio n. 24
0
 public void SetColor(ENTITY type)
 {
     if (EntityData.IsWall(type))
     {
         _Image.color = Wall;
     }
     else if (EntityData.IsActor(type))
     {
         _Image.color = Actor;
     }
 }
Esempio n. 25
0
    public static void RagDoll(bool toggle)
    {
        int ped = PLAYER.PLAYER_PED_ID();

        PED.SET_PED_CAN_RAGDOLL(ped, !toggle);
        PED.SET_PED_CAN_RAGDOLL_FROM_PLAYER_IMPACT(ped, !toggle);
        ENTITY.SET_ENTITY_INVINCIBLE(ped, toggle);
        PED.SET_PED_CAN_BE_KNOCKED_OFF_VEHICLE(ped, 1);
        PLAYER.GIVE_PLAYER_RAGDOLL_CONTROL(ped, !toggle);
        PED.SET_PED_RAGDOLL_ON_COLLISION(ped, !toggle);
    }
Esempio n. 26
0
 public void SetColor(ENTITY type)
 {
     if (EntityData.IsWall(type))
     {
         _Image.color = Wall;
     }
     else if (EntityData.IsActor(type))
     {
         _Image.color = Actor;
     }
 }
Esempio n. 27
0
        private Entity(EntityData data, string name, Bag bag)
            : this()
        {
            _Name = name;
            Bag   = bag;

            _RotationMesh = data.CollisionRotation;
            _EntityType   = data.Name;

            _SetBody(data.Mesh);
        }
Esempio n. 28
0
        private Entity(EntityData data, string name ,Bag bag )
            : this()
        {
            _Name = name;
            Bag = bag;

            _RotationMesh = data.CollisionRotation;
            _EntityType = data.Name;

            _SetBody(data.Mesh);
        }
Esempio n. 29
0
        Guid IMapGate.Spawn(ENTITY type)
        {
            var itemProvider = new ItemProvider();
            var aboriginal   = _Create(_Map, type, itemProvider);

            aboriginal.DoneEvent += () =>
            {
                _Left(aboriginal.Entity.Id);
            };
            _Join(aboriginal);
            return(aboriginal.Entity.Id);
        }
Esempio n. 30
0
        public static int TryParseInt(string propertyName, ENTITY e)
        {
            int result;

            if (!int.TryParse(e.GetPropertyValue(propertyName), NumberStyles.Integer, Culture, out result))
            {
                Debug.LogWarning("Unable to parse property \"" + propertyName + "in " + e.Classname + ": " +
                                 e.GetPropertyValue(propertyName));
                return(0);
            }
            return(result);
        }
Esempio n. 31
0
        private Aboriginal _Create(Map map, ENTITY type, ItemProvider item_provider)
        {
            var entiry = EntityProvider.Create(type);
            var items  = item_provider.FromStolen();

            foreach (var item in items)
            {
                entiry.Bag.Add(item);
            }
            var wisdom     = new StandardBehavior(entiry);
            var aboriginal = new Aboriginal(map, this, entiry, wisdom);

            return(aboriginal);
        }
        public frmNFO_RESUMEN_DIARIO(ENTITY.USUARIO oUSUARIO)
        {
            InitializeComponent();

            cVENTAS = CONTROLADORA.cVENTAS.ObtenerInstancia();
            cAÑO = CONTROLADORA.cAÑO.ObtenerInstancia();
            cMES = CONTROLADORA.cMES.ObtenerInstancia();
            cSUELDO_EMPLEADO = CONTROLADORA.cSUELDO_EMPLEADO.ObtenerInstancia();
            cCTACTE_CLIENTE = CONTROLADORA.cCTACTE_CLIENTE.ObtenerInstancia();
            cMOVIMIENTO_CTACTE_CLIENTE = CONTROLADORA.cMOVIMIENTO_CTACTE_CLIENTE.ObtenerInstancia();
            cMOVIMIENTO_CTACTE_PROVEEDORES = CONTROLADORA.cMOVIMIENTO_CTACTE_PROVEEDORES.ObtenerInstancia();
            cCTACTE_PROVEEDOR = CONTROLADORA.cCTACTE_PROVEEDOR.ObtenerInstancia();
            cGASTO_MENSUAL = CONTROLADORA.cGASTO_MENSUAL.ObtenerInstancia();
            cMOVIMIENTOS_CAJAS = CONTROLADORA.cMOVIMIENTOS_CAJAS.ObtenerInstancia();
        }
Esempio n. 33
0
    public static void TeleportToWaypoint()
    {
        Vector3 wp = WayPoint();

        if (wp.X == 0)
        {
            return;
        }
        GAMEPLAY.GET_GROUND_Z_FOR_3D_COORD(wp.X, wp.Y, 5000.0f, RPC.FreePointer, true);
        float z   = PS4.Extension.ReadFloat(RPC.FreePointer);
        int   ped = PLAYER.PLAYER_PED_ID();
        int   veh = PED.GET_VEHICLE_PED_IS_IN(ped, false);

        ENTITY.SET_ENTITY_COORDS(veh == 0 ? ped : veh, wp.X, wp.Y, z, true, true, true, true);
    }
Esempio n. 34
0
        public static GameObject Instantiate(ENTITY e)
        {
            GameObject    instantiated = new GameObject(e.Classname);
            AnimateAction actionScript = instantiated.AddComponent <AnimateAction>();

            actionScript.Name             = e.GetPropertyValue("Sequence name");
            actionScript.SequencePosition = EntityUtil.TryParseInt("Sequence position", e);
            actionScript.AnimationName    = e.GetPropertyValue("Animation");

            DreamDirector.PostLoadEvent += actionScript.PostLoad;

            EntityUtil.SetInstantiatedObjectTransform(e, ref instantiated);

            return(instantiated);
        }
Esempio n. 35
0
        public static GameObject Instantiate(ENTITY e)
        {
            GameObject      instantiated = new GameObject(e.Classname);
            TriggerSequence script       = instantiated.AddComponent <TriggerSequence>();

            script.SequenceName = e.GetPropertyValue("Sequence name");

            DreamDirector.PostLoadEvent += script.PostLoad;

            EntityUtil.SetInstantiatedObjectTransform(e, ref instantiated);

            instantiated.AddComponent <BoxCollider>().isTrigger = true;

            return(instantiated);
        }
Esempio n. 36
0
 Guid IMapGate.SpawnEnterance(ENTITY type)
 {
     if (_EntityEnteranceResource[type] > 0)
     {
         var itemProvider = new ItemProvider();
         var aboriginal   = _Create(_Map, type, itemProvider);
         _EntityEnteranceResource[type]--;
         _Join(aboriginal);
         aboriginal.DoneEvent += () =>
         {
             _EntityEnteranceResource[type]++;
             _Left(aboriginal.Entity.Id);
         };
         return(aboriginal.Entity.Id);
     }
     return(Guid.Empty);
 }
Esempio n. 37
0
        public static GameObject Instantiate(ENTITY e)
        {
            GameObject instantiated = new GameObject(e.Classname);
            MoveAction actionScript = instantiated.AddComponent <MoveAction>();

            actionScript.Name             = e.GetPropertyValue("Sequence name");
            actionScript.SequencePosition = EntityUtil.TryParseInt("Sequence position", e);
            actionScript.TargetName       = e.GetPropertyValue("Target name");
            actionScript.MoveSpeed        = EntityUtil.TryParseFloat("Move speed", e);
            actionScript.FaceMovementDir  = e.GetSpawnflagValue(0, 1);

            DreamDirector.PostLoadEvent += actionScript.PostLoad;

            EntityUtil.SetInstantiatedObjectTransform(e, ref instantiated);

            return(instantiated);
        }
Esempio n. 38
0
        public static GameObject Instantiate(ENTITY e)
        {
            GameObject       instantiated     = new GameObject(e.Classname);
            DreamEnvironment dreamEnvironment = instantiated.AddComponent <DreamEnvironment>();

            dreamEnvironment.Staticity = EntityUtil.TryParseInt("Staticity", e);
            dreamEnvironment.Happiness = EntityUtil.TryParseInt("Happiness", e);

            dreamEnvironment.SpawnGreyman    = e.GetSpawnflagValue(0, 10);
            dreamEnvironment.ForceSkyColor   = e.GetSpawnflagValue(1, 10);
            dreamEnvironment.ForceFogColor   = e.GetSpawnflagValue(2, 10);
            dreamEnvironment.MusicEnabled    = e.GetSpawnflagValue(3, 10);
            dreamEnvironment.UseSun          = e.GetSpawnflagValue(4, 10);
            dreamEnvironment.UseClouds       = e.GetSpawnflagValue(5, 10);
            dreamEnvironment.UseSunburst     = e.GetSpawnflagValue(6, 10);
            dreamEnvironment.ForceCloudColor = e.GetSpawnflagValue(7, 10);
            dreamEnvironment.UseGradient     = e.GetSpawnflagValue(8, 10);
            dreamEnvironment.ForceSunColor   = e.GetSpawnflagValue(9, 10);

            if (dreamEnvironment.ForceSkyColor)
            {
                dreamEnvironment.SkyColor = EntityUtil.TryParseColor("Sky color", e);
            }
            if (dreamEnvironment.ForceFogColor)
            {
                dreamEnvironment.FogColor = EntityUtil.TryParseColor("Fog color", e);
            }
            if (dreamEnvironment.ForceCloudColor)
            {
                dreamEnvironment.CloudColor = EntityUtil.TryParseColor("Cloud color", e);
            }
            if (dreamEnvironment.ForceSunColor)
            {
                dreamEnvironment.SunColor = EntityUtil.TryParseColor("Sun color", e);
            }

            EntityUtil.SetInstantiatedObjectTransform(e, ref instantiated);

            GameObject.FindGameObjectWithTag("EnvironmentController")
            .GetComponent <EnvironmentController>()
            .EnvironmentEntity = dreamEnvironment;

            DreamDirector.CanSpawnGreyman = dreamEnvironment.SpawnGreyman;

            return(instantiated);
        }
Esempio n. 39
0
    public static void SwapToAimedPed()
    {
        int player = PLAYER.PLAYER_ID();

        if (!PLAYER.GET_ENTITY_PLAYER_IS_FREE_AIMING_AT(player, RPC.FreePointer))
        {
            return;
        }
        int aimedEntity = PS4.Extension.ReadInt32(RPC.FreePointer);

        if (!ENTITY.IS_ENTITY_A_PED(aimedEntity))
        {
            return;
        }

        ChangePed(player, aimedEntity);
    }
Esempio n. 40
0
        public static GameObject Instantiate(ENTITY e)
        {
            GameObject instantiated = new GameObject(e.Classname);
            Target     script       = instantiated.AddComponent <Target>();

            script.Name = e.GetPropertyValue("Name");
            if (script.Name.Equals(string.Empty))
            {
                Debug.LogWarning("Found target entity without name! Please set target name in Torii.");
            }

            EntityUtil.SetInstantiatedObjectTransform(e, ref instantiated);

            Targets.Add(script);

            return(instantiated);
        }
Esempio n. 41
0
        private Dictionary <ENTITY, float> _InitialImperil(ENTITY type)
        {
            if (type == ENTITY.ACTOR2)
            {
                return(new Dictionary <ENTITY, float>
                {
                    { ENTITY.ACTOR2, -5 },
                    { ENTITY.ACTOR3, 0 },
                    { ENTITY.ACTOR4, 0 },
                    { ENTITY.ACTOR5, 0 }
                });
            }
            else if (type == ENTITY.ACTOR3)
            {
                return(new Dictionary <ENTITY, float>
                {
                    { ENTITY.ACTOR1, 0 },
                    { ENTITY.ACTOR3, -10 },
                    { ENTITY.ACTOR4, 1 },
                    { ENTITY.ACTOR5, 3 }
                });
            }
            else if (type == ENTITY.ACTOR4)
            {
                return(new Dictionary <ENTITY, float>
                {
                    { ENTITY.ACTOR1, 0 },
                    { ENTITY.ACTOR3, 3 },
                    { ENTITY.ACTOR4, -10 },
                    { ENTITY.ACTOR5, 1 }
                });
            }
            else if (type == ENTITY.ACTOR5)
            {
                return(new Dictionary <ENTITY, float>
                {
                    { ENTITY.ACTOR1, 0 },
                    { ENTITY.ACTOR3, 1 },
                    { ENTITY.ACTOR4, 3 },
                    { ENTITY.ACTOR5, -10 }
                });
            }

            return(new Dictionary <ENTITY, float>());
        }
Esempio n. 42
0
        public static GameObject Instantiate(ENTITY e)
        {
            GameObject  instantiated = new GameObject(e.Classname);
            SoundAction actionScript = instantiated.AddComponent <SoundAction>();

            actionScript.Name             = e.GetPropertyValue("Sequence name");
            actionScript.SequencePosition = EntityUtil.TryParseInt("Sequence position", e);
            actionScript._source          = instantiated.AddComponent <AudioSource>();
            actionScript._source.outputAudioMixerGroup = _masterMixer.FindMatchingGroups("SFX")[0];

            actionScript.PathToAudioClip = e.GetPropertyValue("Audio clip");

            DreamDirector.PostLoadEvent += actionScript.PostLoad;

            EntityUtil.SetInstantiatedObjectTransform(e, ref instantiated);

            return(instantiated);
        }
Esempio n. 43
0
        static void Main(string[] args)
        {
            Reader reader = new Reader((Message)null, @"c:\Zouev\SLang\SLang Tests\T011.slang");
            //  Reader reader = new Reader((Message)null,@"c:\Zouev\SLang\SLang Config Min\Version.slang");
            //  Reader reader = new Reader((Message)null,@"c:\Zouev\SLang\SLang Tests\Core ver 0.72.slang");
            //  Reader reader = new Reader((Message)null,@"c:\Zouev\SLang\SLang Tests\Core ver 0.6.2.slang");
            //  Reader reader = new Reader((Message)null,@"c:\Zouev\SLang\SLang Tests\Core ver 0.7 Updated.slang");
            //  Reader reader = new Reader((Message)null,@"c:\Zouev\SLang\SLang Tests\Comparable.slang");
            //  Reader reader = new Reader((Message)null,@"c:\Zouev\SLang\SLang Tests\Any.slang");
            //  Reader reader = new Reader(@"unit Integer is end");
            Options   options     = new Options();
            Message   messagePool = new Message(options);
            Tokenizer tokenizer   = new Tokenizer(reader, options, messagePool);

            ENTITY.init(tokenizer, 0, messagePool, options);
            COMPILATION compilation = COMPILATION.parse();

            compilation.report(4);
        }
        public frmESTADO_CTACTE_CLI_DET(ENTITY.USUARIO oUSUARIO)
        {
            InitializeComponent();

            cCTACTE = CONTROLADORA.cCTACTE_CLIENTE.ObtenerInstancia();
            cMOVIMIENTO_CTACTE_CLIENTE = CONTROLADORA.cMOVIMIENTO_CTACTE_CLIENTE.ObtenerInstancia();

            cCLIENTE = CONTROLADORA.cCLIENTE.ObtenerInstancia();

            //ARMACOMBO TIPO DE CORTE
            var col = cCLIENTE.ObtenerClientesConCtaCte().ToList();
            cmbCLIENTES.DataSource = col;
            List<ENTITY.CLIENTE> lista = new List<ENTITY.CLIENTE>();
            ENTITY.CLIENTE oTODOS = new ENTITY.CLIENTE();
            oTODOS.CLI_NOMBREYAPELLIDO = "Seleccione Uno...";
            oTODOS.CLI_ID = 0;
            lista.Add(oTODOS);
            lista.AddRange(col);

            cmbCLIENTES.DataSource = lista;
            cmbCLIENTES.DisplayMember = "CLI_NOMBREYAPELLIDO";
            cmbCLIENTES.ValueMember = "CLI_ID";
            //FIN COMBO TIPO DE CORTE
        }
        public frmESTADO_CTACTE_PROV_DET(ENTITY.USUARIO oUSUARIO)
        {
            InitializeComponent();

            cCTACTE = CONTROLADORA.cCTACTE_PROVEEDOR.ObtenerInstancia();
            cMOVIMIENTO_CTACTE_PROVEEDORES = CONTROLADORA.cMOVIMIENTO_CTACTE_PROVEEDORES.ObtenerInstancia();

            cPROVEEDOR = CONTROLADORA.cPROVEEDOR.ObtenerInstancia();

            //ARMACOMBO TIPO DE CORTE
            var col = cPROVEEDOR.ObtenerProveedoresConCtaCte().ToList();
            cmbPROVEEDORES.DataSource = col;
            List<ENTITY.PROVEEDOR> lista = new List<ENTITY.PROVEEDOR>();
            ENTITY.PROVEEDOR oTODOS = new ENTITY.PROVEEDOR();
            oTODOS.PROV_DESCRIPCION = "Seleccione Uno...";
            oTODOS.PROV_ID = 0;
            lista.Add(oTODOS);
            lista.AddRange(col);

            cmbPROVEEDORES.DataSource = lista;
            cmbPROVEEDORES.DisplayMember = "PROV_DESCRIPCION";
            cmbPROVEEDORES.ValueMember = "PROV_ID";
            //FIN COMBO TIPO DE CORTE
        }
 public static Entity Create(ENTITY type)
 {
     var data = Singleton<Resource>.Instance.FindEntity(type);
     return new Entity(data);
 }
 public static VISTA.frmNFO_RESUMEN_DIARIO ObtenerInstancia(ENTITY.USUARIO oUSUARIO)
 {
     if (instancia == null) instancia = new VISTA.frmNFO_RESUMEN_DIARIO(oUSUARIO);
     if (instancia.IsDisposed) instancia = new VISTA.frmNFO_RESUMEN_DIARIO(oUSUARIO);
     return instancia;
 }
 public frmINFO_GANANCIA_SIN_IVA(ENTITY.USUARIO oUSUARIO)
 {
     InitializeComponent();
     cVENTAS = CONTROLADORA.cVENTAS.ObtenerInstancia();
 }
 public static VISTA.frmINFO_GANANCIA_SIN_IVA ObtenerInstancia(ENTITY.USUARIO oUSUARIO)
 {
     if (instancia == null) instancia = new VISTA.frmINFO_GANANCIA_SIN_IVA(oUSUARIO);
     if (instancia.IsDisposed) instancia = new VISTA.frmINFO_GANANCIA_SIN_IVA(oUSUARIO);
     return instancia;
 }
 public bool IsWall(ENTITY entity_type)
 {
     return EntityData.IsWall(entity_type);
 }
Esempio n. 51
0
 public ActorMind(ENTITY entity_type)
 {
     _EntityType = entity_type;
     _Actors = new Dictionary<Guid, Actor>();
 }
        private Dictionary<ENTITY, float> _InitialImperil(ENTITY type)
        {
            if (type == ENTITY.ACTOR2)
            {
                return new Dictionary<ENTITY, float>
                {
                    {ENTITY.ACTOR2, -5},
                    {ENTITY.ACTOR3, 0},
                    {ENTITY.ACTOR4, 0},
                    {ENTITY.ACTOR5, 0}
                };
            }
            else if (type == ENTITY.ACTOR3)
            {
                return new Dictionary<ENTITY, float>
                {
                    {ENTITY.ACTOR1, 2},
                    {ENTITY.ACTOR3, -10},
                    {ENTITY.ACTOR4, 1},
                    {ENTITY.ACTOR5, 3}
                };
            }
            else if (type == ENTITY.ACTOR4)
            {
                return new Dictionary<ENTITY, float>
                {
                    {ENTITY.ACTOR1, 2},
                    {ENTITY.ACTOR3, 3},
                    {ENTITY.ACTOR4, -10},
                    {ENTITY.ACTOR5, 1}
                };
            }
            else if (type == ENTITY.ACTOR5)
            {
                return new Dictionary<ENTITY, float>
                {
                    {ENTITY.ACTOR1, 2},
                    {ENTITY.ACTOR3, 1},
                    {ENTITY.ACTOR4, 3},
                    {ENTITY.ACTOR5, -10}
                };
            }

            return new Dictionary<ENTITY, float>();
        }
 public frmINFO_VTA_CANCELADAS(ENTITY.USUARIO oUSUARIO)
 {
     InitializeComponent();
     cVENTAS = CONTROLADORA.cVENTAS.ObtenerInstancia();
 }
 public static VISTA.frmINFO_VTA_CANCELADAS ObtenerInstancia(ENTITY.USUARIO oUSUARIO)
 {
     if (instancia == null) instancia = new VISTA.frmINFO_VTA_CANCELADAS(oUSUARIO);
     if (instancia.IsDisposed) instancia = new VISTA.frmINFO_VTA_CANCELADAS(oUSUARIO);
     return instancia;
 }
 public EnteranceWisdom(ENTITY[] types, Entity owner, IMapGate gate)
 {
     _Types = types;
     _Owner = owner;
     _Gate = gate;
 }
Esempio n. 56
0
 public IVisible FindWounded(ENTITY type, IEnumerable<IVisible> field_of_vision)
 {
     var companions = _FindCompanion(type , field_of_vision);
     return companions.FirstOrDefault((companion) => companion.Status == ACTOR_STATUS_TYPE.STUN);
 }
        public frmESTADO_CTACTE_PROV(ENTITY.USUARIO oUSUARIO)
        {
            InitializeComponent();

            cCTACTE = CONTROLADORA.cCTACTE_PROVEEDOR.ObtenerInstancia();
        }
 private float _GetImperil(ENTITY entity_type)
 {
     float imperil ;
     _EntityImperils.TryGetValue(entity_type, out imperil);
     return imperil;
 }
 public static VISTA.frmESTADO_CTACTE_PROV ObtenerInstancia(ENTITY.USUARIO oUSUARIO)
 {
     if (instancia == null) instancia = new VISTA.frmESTADO_CTACTE_PROV(oUSUARIO);
     if (instancia.IsDisposed) instancia = new VISTA.frmESTADO_CTACTE_PROV(oUSUARIO);
     return instancia;
 }
Esempio n. 60
0
        private IEnumerable<IVisible> _FindCompanion(ENTITY type, IEnumerable<IVisible> field_of_vision)
        {
            var companions = from vis in field_of_vision where vis.EntityType == type  select vis;

            return (from companion in companions
                    from value in _Actors.Values
                    where companion.Id == value.Id select companion);
        }