Need score help
by Jason Walters · in Torque X 2D · 12/15/2008 (10:23 am) · 2 replies
Hello!
Are there are good score tutorials out there? I am working on a shooter and would like to assign a certain amount of points to each enemy character. When the player destroys a specific character I would like his score to reflect those points.
I've gone through most of the torquex tutorials but, I'm still learning so please go easy. :)
Are there are good score tutorials out there? I am working on a shooter and would like to assign a certain amount of points to each enemy character. When the player destroys a specific character I would like his score to reflect those points.
I've gone through most of the torquex tutorials but, I'm still learning so please go easy. :)
Associate John Kanalakis
EnvyGames
Game.cs would have something like this...
public class Game : TorqueGame { private int _playerScore1 = 0; private int _playerScore2 = 0; public int PlayerScore1 { get { return _playerScore1; } set { _playerScore1 = value; } } public int PlayerScore2 { get { return _playerScore2; } set { _playerScore2 = value; } } }And then the rest of your game (any component, any gui, and object) can make the following call...
-or-
Again, lots of ways to do this and there's no "right way" to do this.
John K.
(Edit:added code formatting)