本文整理汇总了C#中ScoreManager类的典型用法代码示例。如果您正苦于以下问题:C# ScoreManager类的具体用法?C# ScoreManager怎么用?C# ScoreManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ScoreManager类属于命名空间,在下文中一共展示了ScoreManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Awake
void Awake()
{
score = GetComponent<ScoreManager>();
ListJoystickButtons();
Init();
StartCoroutine("UpdateDifficulty");
}
示例2: Awake
// Use this for initialization
void Awake() {
scr_ObjectFactory = GameObject.FindGameObjectWithTag("ObjectFactory").GetComponent<objectFactory>();
scoreText = GameObject.FindGameObjectWithTag("scoreText").GetComponent<ScoreManager>();
passedTop = false;
rotation = new Vector3(0, 0, 0);
blueClimbRotation = new Vector3(0, 0, 0);
redClimbRotation = new Vector3(0, 0, 0);
isGrounded = true;
allowFalling = true;
colTrggerCount = 0;
redDirectionValue = runningSpeed;
blueDirectionValue = -runningSpeed;
running = new Vector3(runningSpeed,0.0f);
runningSlope = new Vector3(slopeRunningSpeed, slopeRunningSpeed);
climbing = new Vector3(0.0f, climbingSpeed);
falling = new Vector3(0.0f, -climbingSpeed);
currentState = manState.Running;
//directionValue = 10.0f;
//frontCollider = Instantiate(objectFactory.pdf_ManMiniCollider) as GameObject;
//frontCollider.GetComponent<BoxCollider2D>().isTrigger = true;
//frontCollider.GetComponent<scr_manMiniCollider>().Initialize(this.gameObject);
groundCollider = Instantiate(scr_ObjectFactory.pdf_ManGroundCollider) as GameObject;
groundCollider.GetComponent<scr_manGroundCollider>().Initialize(this.gameObject);
backCollider = Instantiate(scr_ObjectFactory.pdf_ManMiniCollider) as GameObject;
backCollider.GetComponent<scr_manMiniCollider>().Initialize(this.gameObject);
manRenderer = GetComponent<Renderer>();
}
示例3: Awake
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void Awake()
{
Application.targetFrameRate = 60;
m_players = new GameObject[2];
if(GameObject.Find("PLAYER0"))
m_players[0] = GameObject.Find("PLAYER0");
else
m_players[0] = GameObject.Find("PLAYER0_concept");
if(GameObject.Find("PLAYER1"))
m_players[1] = GameObject.Find("PLAYER1");
else
m_players[1] = GameObject.Find("PLAYER1_concept");
targetCameraManager = GameObject.Find("TargetCamera");
num_levels = PlayerPrefs.GetInt("num_levels");
if(bConcept)
triangle = (GameObject)Instantiate(Resources.Load("triangle", typeof(GameObject)));
guiManager = GetComponent<GUIManager>();
scoreManager = GetComponent<ScoreManager>();
goAudioManager = GameObject.Find("goAudioManager");
}
示例4: Awake
void Awake()
{
player1pos = GameObject.FindWithTag("Player1").transform.position;
player2pos = GameObject.FindWithTag("Player2").transform.position;
scoreManager = GameObject.FindWithTag("GameManager").GetComponent<ScoreManager>();
startRotation = transform.eulerAngles;
}
示例5: Update
// Update is called once per frame
void Update()
{
if(mScoreManager != null)
{
if(mScoreManager.mLivesRemaining >= mIconNumber)
{
//GetComponent<Image>().enabled = true;
GetComponent<Animator>().SetBool("LifeLost", false);
//GetComponent<Animator>().Play("LifeIcon_Idle");
if(GetComponent<Image>().enabled == false)
{
ToggleLifeIcon();
}
}
else
{
//GetComponent<Image>().enabled = false;
GetComponent<Animator>().SetBool("LifeLost", true);
}
}
else
{
GetComponent<Image>().enabled = false;
mScoreManager = FindObjectOfType<ScoreManager>();
}
}
示例6: Awake
void Awake()
{
death_positions = new List<Vector3>();
//Check if there is already an instance of ScoreManager
if (instance == null){
//if not, set it to this.
instance = this;
DontDestroyOnLoad(gameObject);
RestartValues();
//testValues();
if (!loadHiscores())
{
print("No valid highscore file detected. Creating new one.");
hscores.Clear();
createHiscoresFile();
}
}
//If instance already exists:
else if (instance != this)
{
//Destroy this, this enforces our singleton pattern so there can only be one instance
Destroy(gameObject);
}
}
示例7: Start
// Use this for initialization
void Start()
{
DangerTag = transform.parent.GetComponent<FloorRythm>().DangerTag;
audioSys = GameObject.Find("Audio System").GetComponent<AudioSystem>();
scoreManager = GameObject.Find("Score Manager").GetComponent<ScoreManager>();
BPM = 280;// GameObject.Find("Main Camera").GetComponent<SceneSetup>().BPM;
}
示例8: Awake
void Awake()
{
startPosition = GameObject.FindGameObjectWithTag("Position-Start").transform.position;
player = GameObject.FindGameObjectWithTag("Player").GetComponent<Character>();
platformManager = this.GetComponent<PlatformManager>();
scoreManager = this.GetComponent<ScoreManager>();
}
示例9: Start
// Use this for initialization
void Start () {
scoreManager = GameObject.FindObjectOfType<ScoreManager>();
string[] names = scoreManager.getPlayerNames ();
int i, j;
for (i = 0; i < names.Length-1; i++) {
for (j = i + 1; j < names.Length; j++) {
if (Convert.ToInt32 (scoreManager.GetScore (names [i], "score")) <
Convert.ToInt32 (scoreManager.GetScore (names [j], "score"))) {
string temp = names[i];
names [i] = names [j];
names [j] = temp;
}
}
}
int k = 1;
foreach(string name in names){
GameObject go = (GameObject)Instantiate (playerScoreEntryPrefab);
go.transform.SetParent (this.transform);
go.transform.Find ("Player").GetComponent<Text> ().text = name;
go.transform.Find ("Score").GetComponent<Text> ().text = scoreManager.GetScore(name,"score");
go.transform.Find ("Date").GetComponent<Text> ().text = scoreManager.GetScore (name, "date");
go.transform.Find ("Rank").GetComponent<Text> ().text = k.ToString();
k++;
}
}
示例10: Start
void Start()
{
currGameBoardPlayer = (int)Sabotage.Enums.Player.ONE; // Player One starts off the game.
activePlayer = (int)Sabotage.Enums.PlayerType.GAMEBOARD; // The GameBoard Player starts playing first.
scoreManagerScript = FindObjectOfType<ScoreManager>();
startTileGameObject = GameObject.Find("Start Tile");
startTileScript = startTileGameObject.GetComponent<StartTile>();
playerGameObject = (GameObject)Resources.Load("Prefabs/Player");
Vector3 playerSpawnLocation = startTileGameObject.transform.position + new Vector3(0, 0, -0.5f);
GameObject instantiatedPlayer = (GameObject)Instantiate(playerGameObject,
playerSpawnLocation,
startTileGameObject.transform.rotation);
instantiatedPlayer.transform.localScale = new Vector3(.5f, .5f, .5f);
playerGameObject = instantiatedPlayer.gameObject;
playerGameObject.AddComponent<GameBoardPlayer>();
playerGameObject.AddComponent<MouseMovement>();
playerGameObject.GetComponent<BoxCollider>().isTrigger = true;
playerGameObject.AddComponent<Rigidbody>().useGravity = false;
playerOneGameBoardInventory = new ArrayList();
playerOneGodInventory = new ArrayList();
playerTwoGameBoardInventory = new ArrayList();
playerTwoGodInventory = new ArrayList();
maxGameBoardItems = 5;
maxGodItems = 10;
}
示例11: Awake
void Awake()
{
scoreManager = GameObject.FindWithTag("GameManager").GetComponent<ScoreManager>();
ladyAnimation = transform.GetChild(0).GetComponent<LadyAnimation>();
heartParticles.SetActive(false);
dinnerParticles.SetActive(false);
}
示例12: Awake
void Awake()
{
levelManager = FindObjectOfType<LevelManager>();
scoreManager = FindObjectOfType<ScoreManager>();
ballController = FindObjectOfType<BallController>();
anim = GetComponent<Animator>();
}
示例13: Awake
void Awake()
{
LevelIndex = Application.loadedLevel;
instance = this;
if (controlsManager == null) {
GameObject newCM = new GameObject("Control_Manager");
controlsManager = newCM.AddComponent<ControlsManager>();
newCM.transform.SetParent(this.transform);
}
// GET THE SCORE MANAGER //
if (scoreManager == null) {
GameObject newScM = new GameObject("Score_Manager");
scoreManager = newScM.AddComponent<ScoreManager>();
newScM.transform.SetParent(this.transform);
}
// LETS SETUP A SCENE //
if (sceneManager == null) {
GameObject newSM = new GameObject("Scene_Manager");
sceneManager = newSM.AddComponent<SceneManager>();
newSM.transform.SetParent(this.transform);
}
// link the debugger //
GameObject dbg = GameObject.Find ("Debugger");
debugger = dbg.GetComponent<Debugger> ();
}
示例14: Start
void Start()
{
RangeBox = GetComponent<BoxCollider>();
EnemyOnRange = new ArrayList();
scoreManager = GameObject.Find("Score Manager").GetComponent<ScoreManager>();
PlayerAnim = gameObject.GetComponent<Animator>();
}
示例15: Start
void Start()
{
dropable = PlayerManager.instance.dropable.prefab;
scoreManager = GetComponent<ScoreManager>();
scoreManager.score = 0;
UpdateDropSize();
}