示例#1
0
        /*
        protected Game1 game;
        protected RenderTarget2D rTarg;
        protected SpriteBatch sb;
        protected Vector2 texPos;
        protected float initRot;*/
        public JsConsoleModel(JunkShip junkShip, Game1 game)
            : base()
        {
            this.console = (JsConsole)junkShip;
            this.game = game;
            pos = console.pos;
            //pos.Y -= 8;
            model = ModelLibrary.mgConsole;
            scale = new Vector3(1f);
            rot.Y = (float)Math.Atan2(junkShip.dir.X, junkShip.dir.Z);
            initRot = rot.Y;

            rTarg = new RenderTarget2D(game.GraphicsDevice, 512, 512);
            sb = new SpriteBatch(game.GraphicsDevice);
            texPos = Vector2.Zero;
        }
示例#2
0
        public JunkShipModel(JunkShip junkShip, Game1 game)
            : base()
        {
            this.junkShip = junkShip;
            this.game = game;
            pos = junkShip.pos;
            //pos.Y -= 8;
            model = ModelLibrary.artefact;
            scale = new Vector3(1f);
            rot.Y = (float)Math.Atan2(junkShip.dir.X, junkShip.dir.Z);
            rot.Y -= MathHelper.PiOver2;
            initRot = rot.Y;

            rTarg = new RenderTarget2D(game.GraphicsDevice, 512, 512);
            sb = new SpriteBatch(game.GraphicsDevice);
            texPos = Vector2.Zero;
        }
示例#3
0
 public void addShip(JunkShip j)
 {
     junkShips.Add(j);
 }
示例#4
0
 public void activate(Vector3 pos, Vector3 dir, JunkShip source)
 {
     if (!triggeredHelp)
     {
         game.hud.hudHelp.activate();
         triggeredHelp = true;
     }
     drillGame = false;
     this.activeSource = source;
     displayer.wake(pos, dir);
     active = true;
     start = true;
     holdTime = 0;
     holdThresh = 2;
     hudMg.trigger(manager.speed);
     manager.reset();
     moneyEarned = 0;
     success = false;
 }