当前位置: 首页>>代码示例>>C#>>正文


C# GameMode类代码示例

本文整理汇总了C#中GameMode的典型用法代码示例。如果您正苦于以下问题:C# GameMode类的具体用法?C# GameMode怎么用?C# GameMode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


GameMode类属于命名空间,在下文中一共展示了GameMode类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Start

 void Start()
 {
     k = 0;
     currentWaveTanksNumber = 5;
     spawnPoint = GameObject.Find("SpawnPoint").GetComponent<Transform>();
     gameModeScript = GameObject.Find("ManagerScripts").GetComponent<GameMode>();
 }
开发者ID:msisov,项目名称:game-project-space,代码行数:7,代码来源:CreateAndManageMobs.cs

示例2: Start

	void Start () {
		if (gameModeIndexSet) {
			gameMode = (GameMode)gameModeIndex;
		}
		if (gameMode == GameMode.Regular) {
			GetComponent<Clock>().StartClock();
		}

		Board.SetPositionFromFen (Definitions.gameStartFen,true);

		ZobristKey.Init ();
		Evaluation.Init ();
		if (regenerateOpeningBook) {
			OpeningBookGenerator.GenerateBook ();
		}
		if (useOpeningBook) {
			OpeningBookReader.Init ();
		}

		playerManager = GetComponent<MoveManager> ();

		playerManager.CreatePlayers ();

		Board.SetPositionFromFen (Definitions.gameStartFen,true);

	}
开发者ID:NotYours180,项目名称:Chess,代码行数:26,代码来源:GameManager.cs

示例3: Initialize

        public void Initialize()
        {
            inGame = new InGame();
            inGame.Initialize();

            gameMode = GameMode.InGameState;
        }
开发者ID:Jusauh,项目名称:God-monster-BBP,代码行数:7,代码来源:Main.cs

示例4: Start

        public void Start(GameMode gameMode)
        {
            int playercount = GtaPlayer.All.Count;
            bool success = true;

            GtaPlayer player = GtaPlayer.Create(499);

            if (GtaPlayer.All.Count - 1 != playercount)
            {
                Console.WriteLine("DisposureTest: Adding didn't add player to pool.");
                success = false;
            }
            player.Dispose();

            if (GtaPlayer.All.Count != playercount)
            {
                Console.WriteLine("DisposureTest: Disposing didn't remove player from pool.");
                success = false;
            }
            try
            {
                player.SetChatBubble("Test!", Color.Yellow, 100, 10);

                Console.WriteLine("DisposureTest: Passed SetChatBubble.");
                success = false;
            }
            catch (ObjectDisposedException)
            {
                Console.WriteLine("DisposureTest: Exception thrown.");
            }

            Console.WriteLine("DisposureTest successful: {0}", success);
        }
开发者ID:WLSF,项目名称:SampSharp,代码行数:33,代码来源:DisposureTest.cs

示例5: Start

        public void Start(GameMode gameMode)
        {
            Native.RegisterExtension(new TestExtension());

            Console.WriteLine("Call OnTest183()");
            new NativeFunction("CallLocalFunction", typeof (string), typeof (string)).Invoke("OnTest183", "");
        }
开发者ID:WLSF,项目名称:SampSharp,代码行数:7,代码来源:ExtensionTest.cs

示例6: EndTurn

    void EndTurn()
    {
        var intGameMode = (int) GameMode;
        intGameMode++;

        GameMode = (GameMode) (intGameMode % Enum.GetNames(typeof (GameMode)).Length);
    }
开发者ID:robinpan,项目名称:bear_minimum,代码行数:7,代码来源:GameController.cs

示例7: ServerResult

 /// <summary>
 /// Initializes a new instance of the <see cref="ServerResult" /> class.
 /// </summary>
 /// <param name="level">The level this server is running.</param>
 /// <param name="gameMode">The game mode this server is running.</param>
 /// <param name="gamePreset">The game preset this server is running.</param>
 /// <param name="url">The URL to the server on BattleLog.</param>
 public ServerResult(GameLevel level, GameMode gameMode, GamePreset gamePreset, string url)
 {
     Level = level;
     GameMode = gameMode;
     GamePreset = gamePreset;
     Url = url;
 }
开发者ID:Skippeh,项目名称:Battlelog-Software,代码行数:14,代码来源:ServerResult.cs

示例8: PlayerItem

 public PlayerItem(Guid uuid, string name, GameMode mode, int ping)
 {
     this.UUID = uuid;
     this.Name = name;
     this.Gamemode = mode;
     this.Ping = ping;
 }
开发者ID:mctraveler,项目名称:MineSharp,代码行数:7,代码来源:PlayerListItem.cs

示例9: Arena

        /**
         * Constructor
         */
        public Arena(Game g, GameMode mode)
            : base(g)
        {
            this.mode = mode;
            Init();
            bounds = new Rectangle(0, 0, (int)Constants.GAME_WORLD_WIDTH, (int)Constants.GAME_WORLD_HEIGHT);
            this.scale = (float)Constants.GAME_WORLD_WIDTH / (float)background.index.Width;
            player1.LoadContent();
            background = game.getSprite("clouds");
            maxLeft = game.maxLeft;
            maxRight = game.maxRight;
            maxTop = game.maxTop;
            maxButtom = game.maxButtom;
            gui = new GUI(g);
            buttons = new Button[g.blockCounter-9];
            int bCounter = 0;

            foreach (String i in g.blockList)
            {
                Button b ;
                if(bCounter%3==0)
                    b = new Button(g, new Vector2(10, (5 + 50 * bCounter)/3), bCounter, i);
                else if(bCounter%3==1)
                    b = new Button(g, new Vector2(50, (5 + 50 * (bCounter-1))/3), bCounter, i);
                else
                    b = new Button(g, new Vector2(90, (5 + 50 * (bCounter - 2)) / 3), bCounter, i);
                //gamaddEntity(b);
                buttons[bCounter] = b;
                bCounter++;
            }
            deathBall = game.getSprite("deathBall");
        }
开发者ID:emre801,项目名称:GameGame,代码行数:35,代码来源:Arena.cs

示例10: ResetLevel

    public static void ResetLevel()
    {
        mode = GameMode.Pause;
        previousGameMode = GameMode.Chase;

        gameModeTimer = 0.0f;
    }
开发者ID:k2r79,项目名称:PacmanVR,代码行数:7,代码来源:GameController.cs

示例11: Apply

    public void Apply(GameModeManagerDef _def)
    {
        if (_def.mode != null)
        {
            if ( ! _def.mode.overrideMode)
            {
                if (mode != null || m_ModeToSet != null)
                {
                    Debug.Log("Mode is already exist. ");
                }
            }

            m_ModeToSet = _def.mode;

            CancelInvoke("SetupProc");

            if (setupDelay <= 0f)
            {
                Debug.LogWarning("Setup mode without delay. Sure?");
                SetupProc();
            }
            else
            {
                Invoke("SetupProc", setupDelay);
            }
        }
    }
开发者ID:JamesKim2998,项目名称:snugdc-project-ricochet,代码行数:27,代码来源:GameModeManager.cs

示例12: ScoreDTO

 public ScoreDTO(int player_id, int score, Difficulty difficulty, GameMode game_mode)
 {
     this.player_id = player_id;
     this.score = score;
     this.difficulty = difficulty;
     this.game_mode = game_mode;
 }
开发者ID:roshanmadhushanka,项目名称:tictactoe,代码行数:7,代码来源:ScoreDTO.cs

示例13: UploadScoreToServer

    public static void UploadScoreToServer(string name, UInt32 score, GameMode gameMode, string levelName)
    {
        if (name.Length != 3) return;
        try
        {
            ScoreGameType gameType = gameTypeLookup[gameMode];
            ScoreLevel level = levelLookup[levelName];
            
            byte[] buffer = new byte[9];

            new ASCIIEncoding().GetBytes(name).CopyTo(buffer, 0);

            // Convert score to bytes
            buffer[3] = (byte)((score & 0xFF000000) >> 24);
            buffer[4] = (byte)((score & 0x00FF0000) >> 16);
            buffer[5] = (byte)((score & 0x0000FF00) >>  8);
            buffer[6] = (byte)((score & 0x000000FF) >>  0);

            buffer[7] = (byte)gameType;
            buffer[8] = (byte)level;

            Coroutiner.StartCoroutine(SendData(GetEncryptedBytes(buffer)));
        }
        catch (Exception) { Debug.Log("Error uploading score to server"); }
    }
开发者ID:mezosaurus,项目名称:eae-project,代码行数:25,代码来源:ServerMessaging.cs

示例14: CheckForGameStart

 private void CheckForGameStart()
 {
     if(m_gameMode == GameMode.ReadyUp && m_playerReady[0] && m_playerReady[1])
     {
         m_gameMode = GameMode.Play;
     }
 }
开发者ID:GabrielSibley,项目名称:games,代码行数:7,代码来源:Game.cs

示例15: changeModeToGameover

 public void changeModeToGameover()
 {
     gmode = GameMode.GAMEOVER;
     gameoverText.gameObject.active = true;
     touchtostartText.gameObject.active = true;
     ShipInstance.gameObject.active = false;
 }
开发者ID:sokude,项目名称:UnityProject-AlienShooter,代码行数:7,代码来源:gameMainScript.cs


注:本文中的GameMode类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。