Example #1
0
 void Start()
 {
     SM    = GameObject.FindObjectOfType <ScoreManeger>().GetComponent <ScoreManeger>();
     East  = GameObject.Find("East");
     South = GameObject.Find("South");
     Noth  = GameObject.Find("Noth");
     West  = GameObject.Find("West");
     StartCoroutine("ESpawn");
 }
Example #2
0
 void OnMouseOver()
 {
     if (Input.GetMouseButtonDown(0))
     {
         if (GameObject.FindGameObjectWithTag("player"))
         {
             Destroy(gameObject);
             ScoreManeger.AddPoints(pointsToAdd);
         }
     }
 }
Example #3
0
    private void Awake()
    {
        if (Instance == null)
        {
            Instance = this;
            DontDestroyOnLoad(gameObject);
        }
        else
        {
            Destroy(gameObject);
        }
        for (int i = 0; i < _scoreCount; i++)
        {
            _highscores.Add(PlayerPrefs.GetInt("highscores" + i));
        }

        SavePoints();
    }
Example #4
0
    void Start()
    {
        //myrigidbody = GetComponent<Rigidbody2D>();
        BlockO = GameObject.FindGameObjectWithTag("Stop");
        //	Explode = GameObject.Find ("Particules");
        player = GameObject.Find("Player");
        Spawn  = GameObject.Find("SpawnPoint");
        bC     = player.GetComponent <Rigidbody2D> ();
        Mp     = player.GetComponent <PlayerMovement> ();
        Bm     = BlockO.GetComponent <Bmove> ();
        Scor   = player.GetComponent <ScoreManeger> ();
        //Timer = delayTimer;
        //Explode.GetComponent<ParticleSystem> ().enableEmission = false;
        //	Application.LoadLevel (2);



        /*if (PlayerPrefs.GetFloat ("Highscore") < Scor.ScoreCount)
         * {
         *      PlayerPrefs.SetFloat ("HighScore", Scor.ScoreCount);
         * }
         */
    }
Example #5
0
 // Use this for initialization
 void Start()
 {
     scoreManeger = GameObject.Find("ScoreManeger").GetComponent <ScoreManeger>();
 }
Example #6
0
 void Start()
 {
     myrigidbody = GetComponent <Rigidbody2D>();
     player      = GameObject.Find("Player");
     Scor        = player.GetComponent <ScoreManeger> ();
 }