예제 #1
0
    void Awake()
    {
        ChaserFactory chaserFactory = Singleton <ChaserFactory> .Instance;

        chaser = chaserFactory.getChaser();
        chaser.setParent(this.gameObject, defaultLoc);
        chaser.setCheckerWorldLoc(this.transform.position);
        score = Object.Instantiate(Resources.Load("Prefabs/score"), Vector3.zero, Quaternion.identity) as GameObject;
        score.transform.parent        = this.gameObject.transform;
        score.transform.localPosition = Vector3.zero;
        score.name = "score" + this.gameObject.name.Substring(7);
    }
예제 #2
0
 public void reset()
 {
     chaser.reset();
     score.SetActive(true);
     chaser.setParent(this.gameObject, defaultLoc);
 }