예제 #1
0
        public void Load(List <String> p_effect)
        {
            if (p_effect == null)
            {
                return;
            }

            BinaryReader    reader      = null;
            String          effectName  = null;
            Pax4EffectState effectState = null;

            for (int i = 0; i < p_effect.Count; i++)
            {
                effectName = p_effect[i];
                if (GetChild().ContainsKey(effectName))
                {
                    continue;
                }

                effectState = new Pax4EffectState(effectName, this);

                reader = new BinaryReader(File.Open("Content/" + effectName, FileMode.Open));
                effectState._effect = new Effect(Pax4Game._graphicsDeviceManager.GraphicsDevice, reader.ReadBytes((int)reader.BaseStream.Length));
            }
        }
예제 #2
0
        public void Load(String p_effect)
        {
            if (GetChild().ContainsKey(p_effect))
            {
                return;
            }

            BinaryReader reader = null;

            Pax4EffectState effectState = new Pax4EffectState(p_effect, this);

            reader = new BinaryReader(File.Open(p_effect, FileMode.Open));
            effectState._effect = new Effect(Pax4Game._graphicsDeviceManager.GraphicsDevice, reader.ReadBytes((int)reader.BaseStream.Length));
        }