• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Score类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: Awake

 // Use this for initialization
 void Awake()
 {
     killCombo = GetComponent<KillCombo>();
     score = GetComponent<Score>();
     deathBlowGauge = GetComponent<DeathBlowGauge>();
     lifes2D = GetComponent<Lifes2D>();
 }
开发者ID:YutaKaseda,项目名称:ProjectVR,代码行数:8,代码来源:AllUI.cs


示例17: ReadFromFile

        private static void ReadFromFile()
        {
            try
            {
                StreamReader sr = new StreamReader("Content/Text Files/HighScores.txt");

                string input = sr.ReadLine();

                while (input != null)
                {
                    string[] data = input.Split(',');
                    Score s = new Score(data[0], int.Parse(data[1]));

                    HighscoreList.Add(s);

                    input = sr.ReadLine();
                }
                sr.Close();
                HighscoreList.Sort();
            }
            catch
            {
                //No Current Scores in File
                HighscoreList.Add(new Score("No scores to display", 0));
            }
        }
开发者ID:Zopherus,项目名称:Wumpus,代码行数:26,代码来源:Highscore.cs


示例18: AddScore

	public void AddScore (int level, int value)
	{
		Score s = new Score ();
		s.Level = level;
		s.Value = value;
		scores.Add (s);
	}
开发者ID:eriol1977,项目名称:Bullseye,代码行数:7,代码来源:Player.cs


示例19: OnEnable

 // Use this for initialization
 void OnEnable()
 {
     _Score = GameObject.FindGameObjectWithTag ("Score").GetComponent<Score> ();
     _text = gameObject.GetComponent<Text> ();
     //		gameObject.GetComponent<Canvas>().sortingLayerName = "Buttons";
     _text.text =  _Score._score.ToString() ;
 }
开发者ID:rbbernardino,项目名称:spyder,代码行数:8,代码来源:MyScore.cs


示例20: Awake

 void Awake()
 {
     Application.targetFrameRate = 60;
     player = GameObject.Find("Player").GetComponent<Player>();
     spawner = GameObject.Find("Spawner").GetComponent<Spawner>();
     Score = Hud.GetComponent<Score>();
 }
开发者ID:kobayashi-taichi,项目名称:hello-world,代码行数:7,代码来源:Scene.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ScoreManager类代码示例发布时间:2022-05-24
下一篇:
C# ScopedDictionary类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap