Example #1
0
        public void CreateParticleAt(string pid, int gx, int gy)
        {
            var ps = GameFactory.LoadParticleFromTemplate(pid, (gx + 0.5f) * this.CellWidth, (gy + 0.5f) * this.CellHeight, this.world.worldView.ObjectsLayer);

            if (ps != null)
            {
                IoManager.AddWidget(ps);
                Logger.Debug("Simulator", "CreateParticle", ps.ToString());
            }
        }
Example #2
0
        public void CreateParticleOn(string pid, Entity target)
        {
            var flip = (target.OutObject.Facing == Facing.RIGHT) ? false : true;
            var ps   = GameFactory.LoadParticleFromTemplate(pid, 0f, 0f, this.world.worldView.ObjectsLayer, flip);

            if (ps != null)
            {
                target.OutObject.AddParticleSystem(ps);
                IoManager.AddWidget(ps);
            }
        }
Example #3
0
        public void CreateParticleOn(string pid, string oid)
        {
            Entity res;

            if (this.world.entities.TryGetValue(oid, out res))
            {
                var ps = GameFactory.LoadParticleFromTemplate(pid, 0f, 0f, this.world.worldView.ObjectsLayer);
                if (ps != null)
                {
                    res.OutObject.AddParticleSystem(ps);
                    IoManager.AddWidget(ps);
                }
            }
        }