Пример #1
0
 // Use this for initialization
 void Start()
 {
     TankStat    = GetComponent <TankStatScript> ();
     GMScript    = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <GameManagerScript> ();
     MoveSpeed   = 10;
     RotSpeed    = 100;
     Boost       = 0;
     RocketMax   = 10;
     BoostMax    = 50;
     RBTank      = GetComponent <Rigidbody> ();
     myGuiScript = GetComponentInChildren <GuiLifeBar> ();
 }
Пример #2
0
        public void LoadContent(ContentManager content, GraphicsDevice graphicsDevice)
        {
            txtBoxWaves  = new GuiTextBox(new Vector2(Game1.ViewPortWidth - 147, Game1.ViewPortHeight - 39), 137, 29, 1, Color.Black * 0.39f, new Color(98, 0, 0), "Waves: " + SpawnManager.WaveCount, @"Fonts\HUDFont");
            boxLifeBars  = new GuiBox(new Vector2(10, Game1.ViewPortHeight - 54), 162, 44, 1, Color.Black * 0.39f, new Color(98, 0, 0), graphicsDevice);
            lfbHealthBar = new GuiLifeBar(new Vector2(28, Game1.ViewPortHeight - 45), playerRef.myShip.Health, @"Sprites\GUI\Health-Bar");
            lfbShieldBar = new GuiLifeBar(new Vector2(28, Game1.ViewPortHeight - 29), playerRef.myShip.Shield, @"Sprites\GUI\Shield-Bar");

            guiSystem.Add(txtBoxScore);
            guiSystem.Add(txtBoxFlamoca);
            guiSystem.Add(txtBoxWaves);
            guiSystem.Add(boxLifeBars);
            guiSystem.Add(lfbHealthBar);
            guiSystem.Add(lfbShieldBar);

            guiSystem.LoadContent(content, graphicsDevice);
        }