Ejemplo n.º 1
0
 // Start is called before the first frame update
 void Start()
 {
     thisCollider = GetComponent <Collider2D>();
     walkScript   = GetComponent <WalkOnPlatForm>();
     //walkScript = this.gameObject.GetComponent<WalkOnPlatForm>();
     rb = GetComponent <Rigidbody2D>();
 }
Ejemplo n.º 2
0
    // Start is called before the first frame update
    void Start()
    {
        catSounds         = GetComponents <AudioSource>();
        catDie            = catSounds[0];
        gameManagerObject = GameObject.Find("GameManager");
        gm           = gameManagerObject.GetComponent <GameManager>();
        thisCollider = GetComponent <BoxCollider2D>();
        walkScript   = GetComponent <WalkOnPlatForm>();
        Rigidbody2D rb = GetComponent <Rigidbody2D>();

        catSpriteRender = GetComponent <SpriteRenderer>();
    }