GameWorldControl.AddScore C# (CSharp) Method

AddScore() public method

public AddScore ( int points ) : void
points int
return void
    public void AddScore(int points)
    {
        score += points;
        scoreLabel.text = "Score: " + score;
    }

Usage Example

コード例 #1
0
ファイル: PlayerController.cs プロジェクト: Dit29/GameScript
 //MESSAGES
 //Add to the players score when receiving back an AddToScore message
 void AddToScore(int points)
 {
     gameWorldControlScript.AddScore(points);
 }