Пример #1
0
    private void Ammo()
    {
        int selectedPlayerShell = playerShellSizes.GetSelectedItemIndex();

        GUI.Label(new Rect(startX, startY + 30, 180, 21), "Player Shell Size");
        selectedPlayerShell = playerShellSizes.List(new Rect(startX + 10, startY + 60, 60, 20), Sizes[selectedPlayerShell].text, Sizes, listStyle);
        playerShellCaliber  = (DataShells.ShellSize)System.Enum.Parse(typeof(DataShells.ShellSize), Sizes[selectedPlayerShell].text);

        int selectedPlayerRocket = playerRocketSizes.GetSelectedItemIndex();

        GUI.Label(new Rect(startX + 120, startY + 30, 180, 21), "Player Rocket Size");
        selectedPlayerRocket = playerRocketSizes.List(new Rect(startX + 130, startY + 60, 60, 20), Sizes[selectedPlayerRocket].text, Sizes, listStyle);
        playerRocketCaliber  = (DataRockets.RocketSize)System.Enum.Parse(typeof(DataRockets.RocketSize), Sizes[selectedPlayerRocket].text);

        int selectedBotShell = botShellSizes.GetSelectedItemIndex();

        GUI.Label(new Rect(startX + 300, startY + 30, 180, 21), "Bot Shell Size");
        selectedBotShell = botShellSizes.List(new Rect(startX + 310, startY + 60, 60, 20), Sizes[selectedBotShell].text, Sizes, listStyle);
        botShellCaliber  = (DataShells.ShellSize)System.Enum.Parse(typeof(DataShells.ShellSize), Sizes[selectedBotShell].text);

        int selectedBotRocket = botRocketSizes.GetSelectedItemIndex();

        GUI.Label(new Rect(startX + 400, startY + 30, 180, 21), "Bot Rocket Size");
        selectedBotRocket = botRocketSizes.List(new Rect(startX + 410, startY + 60, 60, 20), Sizes[selectedBotRocket].text, Sizes, listStyle);
        botRocketCaliber  = (DataRockets.RocketSize)System.Enum.Parse(typeof(DataRockets.RocketSize), Sizes[selectedBotRocket].text);

        GUI.Label(new Rect(startX + 60, startY + 170, 180, 21), "Player Rocket Count");
        playerRockets = GUI.TextField(new Rect(startX + 60, startY + 190, 50, 21), playerRockets, 25);

        GUI.Label(new Rect(startX + 350, startY + 170, 180, 21), "Bot Rocket Count");
        botRockets = GUI.TextField(new Rect(startX + 350, startY + 190, 50, 21), botRockets, 25);
    }
Пример #2
0
	private void Start () 
	{
		GameData info = GameObject.Find("GameData").GetComponent<GameData>();
		botRocketCaliber = info.botRocketCaliber;
		playerRocketCaliber = info.playerRocketCaliber;
		playerShellCaliber = info.playerShellCaliber;
		botShellCaliber = info.botShellCaliber;
		playerRocketCount = info.playerRocketCount;
		botRocketCount = info.botRocketCount;
		ShowBotChassisProps = info.ShowBotChassisProps;
		ShowBotTurretProps = info.ShowBotTurretProps;
		ShowBotMinigun = info.ShowBotMinigun;
		ShowBotSideskirts = info.ShowBotSideskirts;
		ShowPlayerChassisProps = info.ShowPlayerChassisProps;
		ShowPlayerTurretProps = info.ShowPlayerTurretProps;
		ShowPlayerMinigun = info.ShowPlayerMinigun;
		ShowPlayerSideskirts = info.ShowPlayerSideskirts;
		scoreLimit = info.scoreMax;
		difficultyLevel = info.gameDifficulty;
		
		Destroy(GameObject.Find("GameData"));
			
		CreateNew();
		for (int i = 1; i <= scoreLimit; i *= 10) 
		{
			scoreLimitZeros++;
		}
		//Replaced at scene --> GameInformation
		//PauseMenu pauseMenu = gameObject.AddComponent("PauseMenu") as PauseMenu;
	}
Пример #3
0
    private void Start()
    {
        GameData info = GameObject.Find("GameData").GetComponent <GameData>();

        botRocketCaliber       = info.botRocketCaliber;
        playerRocketCaliber    = info.playerRocketCaliber;
        playerShellCaliber     = info.playerShellCaliber;
        botShellCaliber        = info.botShellCaliber;
        playerRocketCount      = info.playerRocketCount;
        botRocketCount         = info.botRocketCount;
        ShowBotChassisProps    = info.ShowBotChassisProps;
        ShowBotTurretProps     = info.ShowBotTurretProps;
        ShowBotMinigun         = info.ShowBotMinigun;
        ShowBotSideskirts      = info.ShowBotSideskirts;
        ShowPlayerChassisProps = info.ShowPlayerChassisProps;
        ShowPlayerTurretProps  = info.ShowPlayerTurretProps;
        ShowPlayerMinigun      = info.ShowPlayerMinigun;
        ShowPlayerSideskirts   = info.ShowPlayerSideskirts;
        scoreLimit             = info.scoreMax;
        difficultyLevel        = info.gameDifficulty;

        Destroy(GameObject.Find("GameData"));

        CreateNew();
        for (int i = 1; i <= scoreLimit; i *= 10)
        {
            scoreLimitZeros++;
        }
        //Replaced at scene --> GameInformation
        //PauseMenu pauseMenu = gameObject.AddComponent("PauseMenu") as PauseMenu;
    }
Пример #4
0
 private DataGun EditGunData(DataGun gun, int rotationSpeed, int traverse,
                             int depression, double reloadTime, int power, DataShells.ShellSize shellCaliber)
 {
     gun.RotationSpeed   = rotationSpeed;
     gun.AngleTraverse   = traverse;
     gun.AngleDepression = depression;
     gun.ReloadTime      = reloadTime;
     gun.Power           = power;
     gun.ShellCaliber    = shellCaliber;
     return(gun);
 }
Пример #5
0
	private void Ammo()
	{
		int selectedPlayerShell = playerShellSizes.GetSelectedItemIndex();
		
		GUI.Label( new Rect(startX, startY + 30, 180, 21), "Player Shell Size");
	    selectedPlayerShell = playerShellSizes.List( new Rect(startX + 10, startY + 60, 60, 20), Sizes[selectedPlayerShell].text, Sizes, listStyle );
		playerShellCaliber = (DataShells.ShellSize)System.Enum.Parse(typeof(DataShells.ShellSize), Sizes[selectedPlayerShell].text);
		
		int selectedPlayerRocket = playerRocketSizes.GetSelectedItemIndex();
		
		GUI.Label( new Rect(startX + 120, startY + 30, 180, 21), "Player Rocket Size");
	    selectedPlayerRocket = playerRocketSizes.List( new Rect(startX + 130, startY + 60, 60, 20), Sizes[selectedPlayerRocket].text, Sizes, listStyle );
		playerRocketCaliber = (DataRockets.RocketSize)System.Enum.Parse(typeof(DataRockets.RocketSize), Sizes[selectedPlayerRocket].text);
		
		int selectedBotShell = botShellSizes.GetSelectedItemIndex();
		
		GUI.Label( new Rect(startX + 300, startY + 30, 180, 21), "Bot Shell Size");
	    selectedBotShell = botShellSizes.List( new Rect(startX + 310, startY + 60, 60, 20), Sizes[selectedBotShell].text, Sizes, listStyle );
		botShellCaliber = (DataShells.ShellSize)System.Enum.Parse(typeof(DataShells.ShellSize), Sizes[selectedBotShell].text);
		
		int selectedBotRocket = botRocketSizes.GetSelectedItemIndex();
		
		GUI.Label( new Rect(startX + 400, startY + 30, 180, 21), "Bot Rocket Size");
	    selectedBotRocket = botRocketSizes.List( new Rect(startX + 410, startY + 60, 60, 20), Sizes[selectedBotRocket].text, Sizes, listStyle );
		botRocketCaliber = (DataRockets.RocketSize)System.Enum.Parse(typeof(DataRockets.RocketSize), Sizes[selectedBotRocket].text);
		
		GUI.Label( new Rect(startX+ 60, startY + 170, 180, 21), "Player Rocket Count");
		playerRockets = GUI.TextField(new Rect(startX + 60, startY + 190, 50, 21), playerRockets, 25);
		
		GUI.Label( new Rect(startX + 350, startY + 170, 180, 21), "Bot Rocket Count");
		botRockets = GUI.TextField(new Rect(startX + 350, startY +   190, 50, 21), botRockets, 25);
	}