コード例 #1
0
    // Use this for initialization
    void Start()
    {
        PlayerPrefs.SetInt("canScore", 0);
        scorer       = GameObject.Find("Text");
        Score        = scorer.GetComponent <score> ();
        particlePos  = new Vector2(0, -3.75f);
        particlePosX = particlePos.x;

        if (particles == null)
        {
            if (tagg == "blue")
            {
                particles = GameObject.Find("Particle System - Blue").GetComponent <ParticleSystem> ();
            }
            else if (tagg == "red")
            {
                particles = GameObject.Find("Particle System - Red").GetComponent <ParticleSystem> ();
            }
            else if (tagg == "green")
            {
                particles = GameObject.Find("Particle System - Green").GetComponent <ParticleSystem> ();
            }
            else if (tagg == "yellow")
            {
                particles = GameObject.Find("Particle System - Yellow").GetComponent <ParticleSystem> ();
            }
        }
    }
コード例 #2
0
    // Use this for initialization
    void Start()
    {
        sco = GameObject.FindGameObjectWithTag("Player").GetComponent <score>();
        GameObject menu = GameObject.FindGameObjectWithTag("endmenu");

        menucon = menu.transform.GetChild(1).GetComponent <menucontrol>();
    }
コード例 #3
0
    public List <score> consultarScore(int idplay, string tabla)
    {
        string        conn = "URI=file:" + Application.dataPath + "/Plugins/dislexia.db"; //Path to database.
        IDbConnection dbconn;

        dbconn = (IDbConnection) new SqliteConnection(conn);
        dbconn.Open(); //Open connection to the database.
        IDbCommand dbcmd    = dbconn.CreateCommand();
        string     sqlQuery = "SELECT * FROM " + tabla + " where idplayer=" + idplay;

        dbcmd.CommandText = sqlQuery;
        IDataReader  reader = dbcmd.ExecuteReader();
        List <score> lissc  = new List <score>();

        while (reader.Read())
        {
            int    id    = reader.GetInt32(0);
            string score = reader.GetString(1);
            string fecha = reader.GetString(2);
            string pausa = reader.GetString(4);
            int    nivel = reader.GetInt32(5);
            Debug.Log(score + "  " + fecha);

            score sc = new score(id, score, fecha, pausa, nivel);
            lissc.Add(sc);
        }
        reader.Close();
        reader = null;
        dbcmd.Dispose();
        dbcmd = null;
        dbconn.Close();
        dbconn = null;
        return(lissc);
    }
コード例 #4
0
 void Start()//벽돌 초기 셋팅
 {
     data_tr = GameObject.Find("data_manager").GetComponent <data>();
     noob    = GameObject.Find("Main Camera").GetComponent <cr>();
     Tt      = GameObject.Find("Canvas").transform.Find("Text").GetComponent <score>();
     ani     = Resources.Load <GameObject>("prefab/Ani");
     play    = this.GetComponent <AudioSource>();
     m_d     = D_Option.Mode_data;
     if (D_Option.Mode_data == 1)
     {
         idx = Random.Range(0, ((int)(data_tr.cl_material.Length * 0.5f)) + 1);
         GetComponent <Renderer>().material = data_tr.cl_material[idx * 2];
     }
     else
     {
         GetComponent <Renderer>().material = data_tr.cl_material[noob.Casual_br_cl()];
     }
     if (D_Option.Sound == true)
     {
         play.mute = false;
     }
     else
     {
         play.mute = true;
     }
 }
コード例 #5
0
ファイル: makeenemy.cs プロジェクト: eAdevv/BattleofHogwarts
 void Start()
 {
     score          = GameObject.Find("Harry").GetComponent <score> ();
     ghost_y_spawn1 = gpoint1.position.y;
     ghost_y_spawn2 = gpoint2.position.y;
     ghost_y_spawn3 = gpoint3.position.y;
 }
コード例 #6
0
 void Start()
 {
     characterBody  = character.GetComponent <Rigidbody2D>();
     gameController = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameController>();
     MagnetsUI      = GameObject.FindGameObjectWithTag("collect").GetComponent <magnetsUI>();
     scores         = GameObject.FindGameObjectWithTag("GameController").GetComponent <score>();
 }
コード例 #7
0
 void Start()
 {
     scoreObject = GameObject.Find("ScoreKeeper");
     scoreScript = scoreObject.GetComponent <score>();
     timeObject  = GameObject.Find("TimeKeeper");
     timerScript = timeObject.GetComponent <timerScript>();
 }
コード例 #8
0
 // Start is called before the first frame update
 void Start()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
コード例 #9
0
 // Use this for initialization
 void Start()
 {
     spaceship    = GameObject.FindGameObjectWithTag("Spaceship");
     obstacle     = GetComponent <Transform>();
     score        = GameObject.FindGameObjectWithTag("Score");
     script_score = score.GetComponent <score>();
 }
コード例 #10
0
 void Start()
 {
     score   = GameObject.Find("Harry").GetComponent <score> ();
     wspawn1 = wpoint1.position.y;
     wspawn2 = wpoint2.position.y;
     wspawn3 = wpoint3.position.y;
 }
コード例 #11
0
 void Start()
 {
     makevoldemort = GameObject.Find("ScriptVoldemort").GetComponent <makevoldemort> ();
     makeenemy     = GameObject.Find("ScriptEnemy").GetComponent <makeenemy> ();
     score         = GameObject.Find("Harry").GetComponent <score> ();
     controls      = GameObject.Find("Harry").GetComponent <controls> ();
 }
コード例 #12
0
    // Update is called once per frame
    void OnTriggerEnter2D(Collider2D other)
    {
        if (other.tag == "drops")
        {
            if (leftBalloon == 1)
            {
                mRenderer.enabled   = false;
                mCollider2D.enabled = false;
                mAudio.Play();

                balloonObj.SetActive(false);

                //Destroy (gameObject, mAudio.clip.length);
                //タイマー止める
                //score.gameOver();
                refObj.SetActive(false);
                score scoreScript = refObj.GetComponent <score> ();
                scoreScript.gameOver();
            }
            else
            {
                mAudio.Play();
                leftBalloon = leftBalloon - 1;
                MainSpriteRenderer.sprite = blueBalloon [leftBalloon];
            }
        }
    }
コード例 #13
0
 void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
 }
コード例 #14
0
 private void Start()
 {
     Playermovement = GetComponent <Playermovement>();
     coin           = GameObject.Find("score").GetComponent <coin>();
     score          = GameObject.Find("score").GetComponent <score>();
     highscore      = GameObject.Find("score").GetComponent <highscore>();
 }
コード例 #15
0
        public async Task <IActionResult> Edit(int id, [Bind("id_score,score_number,detail,id_student,test_code")] score score)
        {
            if (id != score.id_score)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(score);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!scoreExists(score.id_score))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["id_student"] = new SelectList(_context.students, "id_student", "id_student", score.id_student);
            ViewData["test_code"]  = new SelectList(_context.tests, "test_code", "test_code", score.test_code);
            return(View(score));
        }
コード例 #16
0
    void Start()
    {
        //Send Movement instance to the score script
        GameObject scoreGameObject = GameObject.Find("GameObjectScoreIsAttachedTo");

        mySpeed = scoreGameObject.GetComponent <score>();
    }
コード例 #17
0
ファイル: PlayerController.cs プロジェクト: ShSaw/rock
 // Start is called before the first frame update
 void Start()
 {
     debounce   = true;
     animation  = GetComponent <Animator>();
     cpu        = GameObject.Find("cpu").GetComponent <cpu_script_real>();
     your_score = GameObject.Find("ScoreBoard").GetComponent <score>();
 }
コード例 #18
0
    /// <summery>
    /// Add feedback
    ///
    /// <typeparam name=""></typeparam> integer tradeID
    /// <typeparam name=""></typeparam> integer userID
    /// <typeparam name=""></typeparam> integer score : one of this two value, 1 & -1
    /// <typeparam name=""></typeparam> string  feedback
    /// <returns></returns> int
    /// </summery>
    public function addFeedback(tradeID, userID, score, feedback)
    {
        global db;

        if (!is_numeric(tradeID) || !is_numeric(userID) || !is_numeric(score) || feedback == ""
            )
        {
            return; // failed
        }
        if (this.getFeedbackByTradeID(tradeID))
        {
            return; //exists
        }
        //Add
        tradeIns    = new Trade();
        tradeData   = tradeIns.getTradeByID(tradeID);
        otherUserID = null;

        if (!tradeData)
        {
            return; //no such trade
        }
        if (tradeData["sellerID"] == userID)
        {
            param       = ["tradeID" => tradeID, "sellerID" => tradeData["sellerID"], "buyerID" => tradeData["buyerID"], "sellerToBuyerScore" => score, "sellerToBuyerFeedback" => feedback, "sellerToBuyerFeedbackCreatedAt" => date("Y-m-d H:i:s")];
コード例 #19
0
    public void Load(score ScoreT)
    {
        float[] loadedScore = saveLoad.LoadData();
        print(loadedScore[0]);
        endScore = loadedScore[0];

        Score.text = "End Score = " + Mathf.FloorToInt(endScore).ToString();
    }
コード例 #20
0
 // Use this for initialization
 void Start()
 {
     rig     = GetComponent <Rigidbody2D>();
     Sprites = GetComponent <SpriteRenderer>();
     //the_sprite = Resources.Load("../spirit/d_monster", typeof(Sprite)) as Sprite;
     get_num_master = GameObject.FindGameObjectWithTag("text").GetComponent <score>();
     the_time       = Time.time;
 }
コード例 #21
0
 private void Awake()
 {
     gm             = FindObjectOfType <ManageGame>();
     healthScript   = FindObjectOfType <healthScript>();
     scoreScript    = FindObjectOfType <score>();
     meteorSpeed    = gm.meteorSpeed;
     meteorLifespan = gm.meteorLifespan;
 }
コード例 #22
0
ファイル: clider.cs プロジェクト: s0040143/flayappBrid_unity
 // Use this for initialization
 void Start()
 {
     s         = GameObject.Find("score").GetComponent <score>();
     clideNum  = 0;
     tag       = "";
     isSuccess = false;
     isFail    = false;
 }
コード例 #23
0
        public ActionResult DeleteConfirmed(int id)
        {
            score score = db.scores.Find(id);

            db.scores.Remove(score);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #24
0
 void Load()
 {
     //Debug.Log("LOAD");
     for (int i = 0; i < 10; i++)
     {
         highScores[i] = new score(PlayerPrefs.GetInt("HSPoints" + i), PlayerPrefs.GetString("HSName" + i));
     }
 }
コード例 #25
0
    // Update is called once per frame
    void Update()
    {
        GameObject thePlayer  = GameObject.Find("Scores");
        score      pts_script = thePlayer.GetComponent <score>();

        string toprint = pts + " ";

        myText.text = toprint;
    }
コード例 #26
0
 void Start()
 {
     level = FindObjectOfType <Level>();
     score = FindObjectOfType <score>();
     if (tag == "breakable")
     {
         level.countblocks();
     }
 }
コード例 #27
0
    void Start()
    {
        score scoreManager = GameObject.Find("ScoreManager").GetComponent <score>();

        point = scoreManager.ScoreValue;

        Make("The end of the competition!! SCORE " + point.ToString() + "!! ");
        radius = 10.0f;
    }
コード例 #28
0
ファイル: player.cs プロジェクト: ye-ma/-
 // Use this for initialization
 void Start()
 {
     point           = FindObjectOfType <point>();
     thescore        = FindObjectOfType <score>();
     Pointgameobject = GameObject.Find("generateObject");
     rg         = GetComponent <Rigidbody2D>();
     co         = GetComponent <Collider2D>();
     myanimator = GetComponent <Animator>();
 }
コード例 #29
0
 // Start is called before the first frame update
 void Start()
 {
     Bom      = GetComponent <AudioSource>();
     Player   = FindObjectOfType <playerShipScript>();
     PointM   = Player.GetComponent <score>();
     AlienAni = GetComponent <Animator>();
     wave     = transform.parent.GetComponent <alienWave>();
     StartCoroutine(AttackRoutine());
 }
コード例 #30
0
 private void Awake()
 {
     explosion    = gameObject.GetComponentsInChildren <AudioSource>()[0];
     particleDead = GameObject.Find("Explosion 1").GetComponentsInChildren <ParticleSystem>();
     Score        = FindObjectOfType <score>();
     StartCoroutine("changePosition");
     scoreText = FindObjectOfType <Text>();
     gameObject.transform.localScale = new Vector3(100, 100, 100);
 }
コード例 #31
0
ファイル: GameController.cs プロジェクト: milad6145/hattrick
 //-------------------------------------------------------------
 void Awake()
 {
     hat_controller_Class=GameObject.Find("HatBackSprite").GetComponent<hatController> ();
     score_Class=GameObject.Find("HatBackSprite").GetComponent<score> ();
 }