本文整理汇总了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();
}
示例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;
}
示例3: ExportScore
public void ExportScore(Score score, string fileName)
{
using (var file = File.Open(fileName, FileMode.Create))
{
ExportScore(score, file);
}
}
示例4: EndQuiz
public void EndQuiz(Score score)
{
_scoreManager.AddScore(score);
_menuStack.Pop();
_menuStack.Push(new QuizResultsDisplay(this,_scoreManager.GetCumulativeQuizScore(), false));
_systemMain.SetStack(_menuStack);
}
示例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;
}
示例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();
}
示例7: ScoreHUD
public ScoreHUD(PlayerManager playerManager)
{
this.playerManager = playerManager;
myScore = new Score();
players = new List<Player>(ProtocolInformation.DummySlot);
}
示例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();
}
}
示例9: ToStringShouldReturnString
public void ToStringShouldReturnString()
{
var score = new Score(this.playerName, this.points, this.time);
var result = score.ToString();
Assert.IsInstanceOfType(result, typeof(string));
}
示例10: Start
private void Start()
{
blockspawner = GameObject.Find ("Blockspawner").GetComponent<Blockspawner>();
thisButton = GetComponent<Button> ();
score = GameObject.Find ("Main Camera").GetComponent<Score> ();
audioSource = GetComponent<AudioSource> ();
}
示例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();
}
示例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>();
}
示例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;
}
示例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();
}
示例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>();
}