示例#1
0
        public TestCamera()
        {
            Moumoune m = new Moumoune(100, 100);

            AddEntity(m);
            CameraUpdater.AddCamera(new Camera2D(Viewport, null, CameraType.Fixed));
        }
示例#2
0
 protected GameModel()
 {
     Graphics = new GraphicsDeviceManager(this);
     Content.RootDirectory = "Content";
     SpriteDrawer          = new SpriteDrawer(this);
     SpriteUpdater         = new SpriteUpdater(this);
     SpriteLoader          = new SpriteLoader(this, Content, SpriteDrawer);
     InputsManager         = new InputsManager(this);
     TextSpriteDrawer      = new TextSpriteDrawer(this);
     TextSpriteUpdater     = new TextSpriteUpdater(this);
     TextSpriteLoader      = new TextSpriteLoader(this, Content, TextSpriteDrawer);
     GeneratorUpdater      = new GeneratorUpdater(this);
     CameraUpdater         = new CameraUpdater(this);
     Cursor            = new Cursor("Cursor2");
     ShapeDrawer       = new ShapeDrawer(this);
     _currentGameState = GameStateType.Game;
 }
示例#3
0
        internal DataUpdater()
        {
            _parsers = new List <Parser>
            {
                new WeekendInfoParser(),
                new DriverInfoParser(this),
                new SessionInfoParser(this),
                new QualiSessionParser(),
                new CameraParser()
            };

            _sessionTimeUpdater   = new SessionTimeUpdater(this);
            _sessionStateUpdater  = new SessionStateUpdater(this);
            _sessionFlagUpdater   = new SessionFlagUpdater(this);
            _cameraUpdater        = new CameraUpdater(this);
            _radioUpdater         = new RadioUpdater(this);
            _entityUpdater        = new EntityUpdater(this);
            _entityResultsUpdater = new EntityResultsUpdater(this);
        }
示例#4
0
    // Use this for initialization
    void Start()
    {
        jumpCount     = 0;
        player        = GameObject.Find("Player");
        fireBurner    = GameObject.Find("fire_killer").GetComponent <fire_burner>();
        cameraUpdater = GameObject.Find("Main Camera").GetComponent <CameraUpdater>();

        timerController = gameObject.GetComponent <TimerController>();

        scorePos = new Rect(5, 5, 200, 30);

        scoreMiddlePos = new Rect(
            nativeWidth / 2 - 200,
            nativeHeight / 2 - 50,
            400,
            100
            );

        GameObject.Find("GlobalVars").GetComponent <GlobalVars> ().level = level;
    }
示例#5
0
 public MoveCameraBot(CameraUpdater cameraUpdater)
 {
     _cameraUpdater = cameraUpdater;
 }
示例#6
0
 public MoveCameraRight(CameraUpdater cameraUpdater)
 {
     _cameraUpdater = cameraUpdater;
 }
示例#7
0
 public MoveCameraTop(CameraUpdater cameraUpdater)
 {
     _cameraUpdater = cameraUpdater;
 }