예제 #1
0
    // This will Instantiate a new PT_FloatingScore GameObject and initialize it.
    // It also returns a pointer to the PT_FloatingScore created so that the
    //  calling function can do more with it (like set fontSizes, etc.)
    public PT_FloatingScore CreatePT_FloatingScore(int amt, List <Vector3> pts)
    {
        GameObject       go = Instantiate(prefabPT_FloatingScore) as GameObject;
        PT_FloatingScore fs = go.GetComponent <PT_FloatingScore>();

        fs.score          = amt;
        fs.reportFinishTo = this.gameObject;         // Set fs to call back to this
        fs.Init(pts);
        return(fs);
    }
예제 #2
0
	public void FSCallback(PT_FloatingScore fs) {
		// When this callback is called by SendMessage,
		//  add the score from the calling PT_FloatingScore
		score += fs.score;
		/*
		switch (fs.type) {
		case FSType.add:
			score += fs.score;
			break;
		case FSType.multiply:
			score *= fs.score;
			break;
		}
		*/
	}
예제 #3
0
    public void FSCallback(PT_FloatingScore fs)
    {
        // When this callback is called by SendMessage,
        //  add the score from the calling PT_FloatingScore
        score += fs.score;

        /*
         * switch (fs.type) {
         * case FSType.add:
         *      score += fs.score;
         *      break;
         * case FSType.multiply:
         *      score *= fs.score;
         *      break;
         * }
         */
    }
예제 #4
0
 // When called by SendMessage, this adds the fs.score to this.score
 public void FSCallback(PT_FloatingScore fs)
 {
     score += fs.score;
 }
예제 #5
0
	// When called by SendMessage, this adds the fs.score to this.score
	public void FSCallback(PT_FloatingScore fs) {
		score += fs.score;
	}