Exemple #1
0
 void Start()
 {
     score=GameObject.Find("Canvas").GetComponent<GameManager>();
     box=GetComponent<BoxCollider2D>();
     scoreTrans=GameObject.Find("score100(Clone)").GetComponent<scoreTransformer>();
     player=GameObject.Find ("Player").transform;
 }
Exemple #2
0
    void Start()
    {
        score=GameObject.Find("Canvas").GetComponent<GameManager>();
        scoreTransform=GameObject.Find("score100(Clone)").GetComponent<scoreTransformer>();

        maxY = this.transform.position.y + .5f;
        minY = maxY - 1.0f;
    }
Exemple #3
0
    protected void Start()
    {
        renderer=transform.Find("body").GetComponent<SpriteRenderer>();
        controller=transform.GetComponent<Controller2D>();
        direction=new Vector2(1,0);
        groundCheck=transform.Find("groundCheck").transform;
        camera=GameObject.Find("MainCamera").GetComponent<Camera>();
        player=GameObject.Find("Player").GetComponent<Player>();
        scoreTrans=GameObject.Find("score100(Clone)").GetComponent<scoreTransformer>();

        //level= GameObject.Find ("MainCamera").GetComponent<LevelCreator>();
        //hBar=GameObject.Find ("MainCamera").transform.GetComponentInChildren("HealthBar").transform.GetComponent<HealthBar>();
    }