Exemplo n.º 1
0
        public static void WriteEffect(EffectMaterial fx, StreamWriter writer)
        {
            // Get Reference To Actual Effect
            WeakReference effectRef = fxRefField.GetValue(fx) as WeakReference;

            // Get The Bytecode (Super-Indirection)
            byte[] code = codeField.GetValue(effectRef.Target as Effect) as byte[];

            // Write The Bytecode
            writer.BaseStream.Write(code, 0, code.Length);
        }
Exemplo n.º 2
0
 public override void LoadContent(Microsoft.Xna.Framework.Content.ContentManager Content)
 {
     botModel = Content.Load<Model>("lift/liftbot");
     midModel = Content.Load<Model>("lift/liftmid");
     topModel = Content.Load<Model>("lift/lifttop");
     topPI = Content.Load<PhysicsInfo>("lift/lifttopphys");
     midPI = Content.Load<PhysicsInfo>("lift/liftmidphys");
     botPI = Content.Load<PhysicsInfo>("lift/liftbotphys");
     liftTexture = Content.Load<Texture2D>("lift/SupportliftDoor_Texture");
     liftNormal = Content.Load<Texture2D>("lift/SupportliftDoor_Normal");
     liftEffect = new EffectMaterial(Game1.NormalEffect);
     base.LoadContent(Content);
 }