コード例 #1
0
    public void Init(PartMenu _PM, string Name, int _PartIndex, string Value)
    {
        PM        = _PM;
        PartIndex = _PartIndex;

        Label.text = Name;
        Cost.text  = "$" + Value;
    }
コード例 #2
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            MapParams createdMapParams;

            PartMenu partsMenu = new PartMenu( );

            display    = new Display(GraphicsDevice, Content, Window, partsMenu);
            controller = new Controller(partsMenu);
            gameWorld  = new World( );

            createdMapParams = CreateMap( );
            ExportMap(createdMapParams);

            gameWorld.MainPlayer = new Player(Vector2.Zero);
            gameWorld.WorldMap   = map;

            display.SetGameWorld(gameWorld);
            controller.SetDisplay(display);
            controller.SetWorld(gameWorld);

            base.Initialize();
        }
コード例 #3
0
 public void Init(PartMenu _PM)
 {
     PM = _PM;
 }