当前位置: 首页>>代码示例>>C#>>正文


C# ScoreManager类代码示例

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


ScoreManager类属于命名空间,在下文中一共展示了ScoreManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Awake

 void Awake()
 {
     score = GetComponent<ScoreManager>();
     ListJoystickButtons();
     Init();
     StartCoroutine("UpdateDifficulty");
 }
开发者ID:BennLockyer,项目名称:GGJ16,代码行数:7,代码来源:GenerateCombos.cs

示例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>();
    }
开发者ID:JRSerjeant,项目名称:GGJ2016,代码行数:34,代码来源:scr_littleMan.cs

示例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");
    }
开发者ID:jsr2k1,项目名称:videojocjj,代码行数:28,代码来源:GameManager.cs

示例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;
 }
开发者ID:BennLockyer,项目名称:GGJ16,代码行数:7,代码来源:FemaleLookAt.cs

示例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>();
     }
 }
开发者ID:AdamMatheny,项目名称:MetagalacticMosntrosities,代码行数:27,代码来源:LifeIconManager.cs

示例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);
        }
    }
开发者ID:TeamGlitch,项目名称:Glitch,代码行数:27,代码来源:ScoreManager.cs

示例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;
 }
开发者ID:Shask,项目名称:WonderJam-October2015,代码行数:8,代码来源:FloorHitBox.cs

示例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>();
 }
开发者ID:KyleBoucher,项目名称:EndlessRunner,代码行数:7,代码来源:LevelManager.cs

示例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++;
		}
	}
开发者ID:diglungdig,项目名称:408TowerDefense,代码行数:27,代码来源:PlayerScoreList.cs

示例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;
    }
开发者ID:romanlarionov,项目名称:Sabotage,代码行数:32,代码来源:PlayerManager.cs

示例11: Awake

 void Awake()
 {
     scoreManager = GameObject.FindWithTag("GameManager").GetComponent<ScoreManager>();
     ladyAnimation = transform.GetChild(0).GetComponent<LadyAnimation>();
     heartParticles.SetActive(false);
     dinnerParticles.SetActive(false);
 }
开发者ID:BennLockyer,项目名称:GGJ16,代码行数:7,代码来源:FemaleParticles.cs

示例12: Awake

 void Awake()
 {
     levelManager = FindObjectOfType<LevelManager>();
     scoreManager = FindObjectOfType<ScoreManager>();
     ballController = FindObjectOfType<BallController>();
     anim = GetComponent<Animator>();
 }
开发者ID:klassifyed,项目名称:BlockBreaker,代码行数:7,代码来源:LoseCollider.cs

示例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> ();
    }
开发者ID:tensus2000,项目名称:Magnaball_1,代码行数:26,代码来源:GameStateManager.cs

示例14: Start

 void Start()
 {
     RangeBox = GetComponent<BoxCollider>();
     EnemyOnRange = new ArrayList();
     scoreManager = GameObject.Find("Score Manager").GetComponent<ScoreManager>();
     PlayerAnim = gameObject.GetComponent<Animator>();
 }
开发者ID:Shask,项目名称:WonderJam-October2015,代码行数:7,代码来源:InputPlayer.cs

示例15: Start

 void Start()
 {
     dropable = PlayerManager.instance.dropable.prefab;
     scoreManager = GetComponent<ScoreManager>();
     scoreManager.score = 0;
     UpdateDropSize();
 }
开发者ID:artboy77,项目名称:DropIt,代码行数:7,代码来源:Dropper.cs


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