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


C# Score类代码示例

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


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

示例1: EmptyLevel

 public EmptyLevel(Content content, Renderer renderer, Score score)
     : base(content, renderer, score)
 {
     for (int x = 0; x < rows; x++)
         for (int y = 0; y < columns; y++)
             bricks[x, y].Dispose();
 }
开发者ID:hillwhite,项目名称:DeltaEngine,代码行数:7,代码来源:EmptyLevel.cs

示例2: CalculateNextEFactor

 private static double CalculateNextEFactor(double eFactor, Score score)
 {
     //EF':=EF+(0.1-(5-q)*(0.08+(5-q)*0.02))
     var q = (int)score;
     var newEF = eFactor + (0.1 - (5 - q) * (0.08 + (5 - q) * 0.02));
     return newEF < MinEF ? MinEF : newEF;
 }
开发者ID:pxavolkov,项目名称:memo,代码行数:7,代码来源:Algorithm.cs

示例3: ExportScore

 public void ExportScore(Score score, string fileName)
 {
     using (var file = File.Open(fileName, FileMode.Create))
     {
         ExportScore(score, file);
     }
 }
开发者ID:killergege,项目名称:RocksmithToTab,代码行数:7,代码来源:GP5File.cs

示例4: EndQuiz

 public void EndQuiz(Score score)
 {
     _scoreManager.AddScore(score);
     _menuStack.Pop();
     _menuStack.Push(new QuizResultsDisplay(this,_scoreManager.GetCumulativeQuizScore(), false));
     _systemMain.SetStack(_menuStack);
 }
开发者ID:eloreyen,项目名称:XNAGames,代码行数:7,代码来源:SystemDisplay.cs

示例5: Match

 public Match(Team home, Team away,int id,int homeTeamGoals, int awayTeamGoals)
 {
     this.homeTeam = home;
     this.awayTeam = away;
     this.score = new Score(homeTeamGoals,awayTeamGoals);
     this.id = id;
 }
开发者ID:KostaKanev,项目名称:myCodes,代码行数:7,代码来源:Match.cs

示例6: Darren

 public void Darren()
 {
     Server.Stub(new ApiExpectation { Method = "POST", Url = "/gamma/scores", Request = "lid=mybaloney&username=Scytale&userkey=gom%20jabbar&points=10039&key=thekey&sig=ea56e70da9398d58eff2ec78d7d00605021dba12", Response = "{}" });
      var score = new Score { Points = 3, UserName = "Name", Data = "Name"};
      new Driver("4ee6add2563d8a7d3200001d", "Fw>HPS^[email protected][[email protected]").SaveScore("4ee6b064563d8a7d32000038", score, "android-emulator", SetIfSuccess);
      WaitOne();
 }
开发者ID:Aranda,项目名称:mogade-csharp,代码行数:7,代码来源:SaveScoreTests.cs

示例7: ScoreHUD

        public ScoreHUD(PlayerManager playerManager)
        {
            this.playerManager = playerManager;

            myScore = new Score();
            players = new List<Player>(ProtocolInformation.DummySlot);
        }
开发者ID:pr0gramm3r1,项目名称:AngryTanks,代码行数:7,代码来源:ScoreHUD.cs

示例8: Update

        public void Update()
        {
            if (!isActive)
                return;

            // first update the local player's score
            myScore = playerManager.LocalPlayer.Score;            

            ks = Keyboard.GetState();
            if (ks.IsKeyDown(Keys.Tab) && oldKs.IsKeyUp(Keys.Tab))
            {
                isOpen = !isOpen;
            }
            oldKs = ks;

            // only load and sort data if we must
            if (isOpen)
            {
                // step 1: get the players from player manager
                players.Clear(); // first clear it out

                // add all remote players
                players.AddRange(playerManager.RemotePlayers.Cast<Player>());

                // add local player, if we can
                if (playerManager.LocalPlayer != null)
                    players.Add(playerManager.LocalPlayer);

                // step 2: sort players in descending order
                // first by wins, then by overall score
                players = players.OrderByDescending(p => p.Score.Wins).ThenByDescending(p => p.Score.Overall).ToList();
            }
        }
开发者ID:pr0gramm3r1,项目名称:AngryTanks,代码行数:33,代码来源:ScoreHUD.cs

示例9: ToStringShouldReturnString

        public void ToStringShouldReturnString()
        {
            var score = new Score(this.playerName, this.points, this.time);
            var result = score.ToString();

            Assert.IsInstanceOfType(result, typeof(string));
        }
开发者ID:HQC-Team-Minesweeper-5,项目名称:Minesweeper,代码行数:7,代码来源:ScoreTests.cs

示例10: Start

 private void Start()
 {
     blockspawner = GameObject.Find ("Blockspawner").GetComponent<Blockspawner>();
     thisButton = GetComponent<Button> ();
     score = GameObject.Find ("Main Camera").GetComponent<Score> ();
     audioSource = GetComponent<AudioSource> ();
 }
开发者ID:sebit0nic,项目名称:Bricklington,代码行数:7,代码来源:StartButton.cs

示例11: handleLevelCompleted

//--------------------------------------------------------------------------------------------

	public void handleLevelCompleted(SceneIndex level)
	{
		isLevelComplete = true;

		//get the saved game manager
		gameManager = GameObject.Find("SavedGameManager").GetComponent<SavedGameManager>();
		if(gameManager == null)
		{
			return;
		}

		//save whether or not the final chassis was used
		didUseFinalChassis = gameManager.getCurrentGame().getCurrentLoadout().getChasis() == Loadout.LoadoutChasis.FINAL;

		//save the score, and if there were no hits (if player not hit, bonus added to final score)
		score = GameObject.Find("Score").GetComponent<Score>();
		finalScore = score.wasPlayerHit ? 
			score.trueScore : 
			score.trueScore + (int)PointVals.NO_HITS;

		//save score and get the old high scores
		oldPersonalHighScore = gameManager.getCurrentGame().highScores[(int)level - 3];
		oldGlobalHighScore = gameManager.globalHighScores[(int)level - 3];

		//save game
		gameManager.handleLevelCompleted(level, finalScore, didUseFinalChassis);

		//now we can activate the panel and run its animations
		gameObject.SetActive(true);
		StartCoroutine(handlePanelAnimations());

		//activate the button
		button.Select();
	}
开发者ID:zachary-goodless,项目名称:Cull-the-Swarm,代码行数:36,代码来源:LevelCompleteHandler.cs

示例12: Start

    // Use this for initialization
    void Start()
    {
        currentScore = GameObject.Find("CurrentScore").GetComponent<CurrentScore>();
        fullScore = GameObject.FindObjectOfType<FullScore>();
        score = GetComponent<Score>();
        energy = GetComponent<Energy>();
        energyLine = GameObject.FindObjectOfType<EnergyLine>();
        inputController = GameObject.FindObjectOfType<InputController>();
        timerScript = GameObject.FindObjectOfType<TimerScript>();
        timerUI = GameObject.FindObjectOfType<TimerUI>();
        info = GetComponent<Info>();
        taskStrings = GetComponent<TaskStrings>();
        pauseButton = GameObject.FindObjectOfType<PauseButton>().gameObject;
        pauseMenu = GameObject.Find("Canvas").GetComponentInChildren<PauseMenu>();
          //  endMenu = GameObject.FindObjectOfType<EndMenu>();
        taskHelper = GameObject.FindObjectOfType<TaskHelper>();
        globalController = GetComponent<GlobalController>();
        cam = GameObject.Find("MainCamera");
        secondCamera = GameObject.Find("SecondCamera");
        wordRideCanvas = GameObject.FindObjectOfType<WordRideCanvas>();

        metalSparksPrefab = Resources.Load("Prefabs/Particles/MetalSpark") as GameObject;
        carUserParametres = GetComponent<CarUserParametres>();
        gameUI = GameObject.FindObjectOfType<GameUI>();
        canvasController = GameObject.FindObjectOfType<CanvasController>();

        particleCanvas = GameObject.Find("ParticleCanvas");
        carCreator = GameObject.FindObjectOfType<CarCreator>();

        mainBonus = GameObject.FindObjectOfType<MainBonus>();

        waitBackground = GameObject.FindObjectOfType<WaitBackground>();
    }
开发者ID:taboo1,项目名称:arena,代码行数:34,代码来源:Library.cs

示例13: GenerateCustomWorld

		//create a crazy world...
		public static World GenerateCustomWorld(){
			World mainWorld = new World("main_world");

			Score s = new Score("numberScore");
			World machineA = new World("machine_a");
			World machineB = new World("machine_b");

			// machine A
			machineA.BatchAddLevelsWithTemplates(2, null, s, null);

			// machine B

			Gate machineALevel1Complete = new WorldCompletionGate("level1_complete", machineA.GetInnerWorldAt(0).ID);

			machineB.BatchAddLevelsWithTemplates(20, machineALevel1Complete, s, null);

			Mission mission1 = new WorldCompletionMission("level2_complete", "Level 2 Completed Mission!", machineA.GetInnerWorldAt(1).ID);
			Mission mission2 = new RecordMission("level1_record_mission", "Level 1 Record Mission!", machineA.GetInnerWorldAt(0).GetSingleScore().ID, 20.0);
			Mission allMissions = new Challenge("main_challange", "MAIN CHALLENGE", new List<Mission>() { mission1, mission2 });

			machineB.GetInnerWorldAt(5).AddMission(allMissions);

			mainWorld.AddInnerWorld(machineA);
			mainWorld.AddInnerWorld(machineB);

			return mainWorld;
		}
开发者ID:Ratel13,项目名称:unity3d-levelup,代码行数:28,代码来源:WorldGenerator.cs

示例14: RunEnd

    public void RunEnd(string cuseOfDeath)
    {
        Score newScore = new Score(gameController.seed, score);
        scoreData.lastRun = newScore;

        if (scoreData.scores.Count == 0)
        {
            scoreData.scores.Add(newScore);
        }
        else
        {
            bool inserted = false;
            for (int i = 0; i < scoreData.scores.Count; ++i)
            {
                if (newScore.score >= scoreData.scores[i].score)
                {
                    scoreData.scores.Insert(i, newScore);
                    inserted = true;
                    break;
                }
            }
            if (!inserted)
            {
                scoreData.scores.Add(newScore);
            }

            if (scoreData.scores.Count > 10)
            {
                scoreData.scores.RemoveAt(10);
            }
        }
        SaveScores();
    }
开发者ID:Greg-Rus,项目名称:SmallCritters,代码行数:33,代码来源:ScoreHandler.cs

示例15: Start

 // Use this for initialization
 void Start()
 {
     _wheel = GetComponent<WheelCollider>();
     //bikerhealth = transform.parent.Find( "bodyHealthTrigger" ).GetComponent<Health>();
     bikerhealth = transform.parent.GetComponentInChildren<Health>();
     bikerscore = transform.parent.GetComponent<Score>();
 }
开发者ID:alect,项目名称:ECGBike,代码行数:8,代码来源:WheelController.cs


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