• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# ScoreManager类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: Awake

    void Awake()
    {
        Time.timeScale = 1f;
        Application.targetFrameRate = 60;

        //gameStatus = true;
        MakeInstance();

        savedCoins = false;

        _ingameUiManager = this.GetComponent<IngameUIManager>();
        _scoreManager = this.gameObject.GetComponent<ScoreManager>();
        _levelEnvironmentSpawner = GameObject.Find("LevelSpawner").GetComponent<LevelEnvironmentSpawner>();

        if (LevelTypeController.instance != null)
        {
            gameType = LevelTypeController.instance.GetGameType();
        }
        else // In the editor this runs if you are not playing from the menu scene
        {
            gameType = "Level0";
            //gameType = "Level0";      Endless
        }


        if (LevelTypeController.instance.GetLastGameSlider() == false)
        {
            StartCoroutine(FadeInMusic());
        }
    }
开发者ID:zinGa1407,项目名称:Hellendoorn-Game,代码行数:30,代码来源:GameManager.cs


示例17: Init

 /// <summary>
 /// [Read only outside script] Checks if the match has started
 /// </summary>
 /*bool MatchStarted
 {
     public get {return MatchStarted;}
     private set {value = MatchStarted;}
 }*/
 // Use this for initialization
 public void Init()
 {
     scriptmanager = GameObject.FindGameObjectWithTag("ScriptManager");
     scoremanager = GetComponent<ScoreManager>();
     gamemodes = scriptmanager.transform.FindChild("GameModes").GetComponents<GameModeScript>();
     initialized = true;
 }
开发者ID:Raboni,项目名称:FastFPS,代码行数:16,代码来源:MatchScriptLocal.cs


示例18: Update

 // Update is called once per frame
 void Update()
 {
     if(mScoreController == null)
     {
         mScoreController = FindObjectOfType<ScoreManager>();
     }
 }
开发者ID:AdamMatheny,项目名称:MetagalacticMosntrosities,代码行数:8,代码来源:BossParticleCollisionHandler.cs


示例19: GotoGameOver

 private IEnumerator GotoGameOver()
 {
     ScoreManager sm = new ScoreManager();
     sm.AddScore(new ScoreEntry() { ScoreInt = this.score, Date = DateTime.Now });
     yield return new WaitForSeconds(2f);
     Globals.GameScore = score;
     Application.LoadLevel("highScoresScene");
 }
开发者ID:c96,项目名称:bubblebreaker,代码行数:8,代码来源:GameManager.cs


示例20: Awake

 void Awake()
 {
     puck = GameObject.FindGameObjectWithTag("puck");
     GameObject gameManager = GameObject.Find("_GameManager");
     scManager = gameManager.GetComponent<ScoreManager>();
     playerOneSpawnPoint = GameObject.FindGameObjectWithTag("spawn-point-player-one");
     puckBody = puck.GetComponent<Rigidbody>();
 }
开发者ID:33windowlicker,项目名称:Air-Hockey,代码行数:8,代码来源:CleanupScene.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ScrReference类代码示例发布时间:2022-05-24
下一篇:
C# Score类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap