Exemplo n.º 1
0
    void Start()
    {
        //Physics2D.IgnoreCollision(Player.GetComponent<BoxCollider2D>(), GetComponent<BoxCollider2D>());
        InvokeRepeating("MaybeTaunt", 1, 5);
        InvokeRepeating("MaybeJump", 1, 3);

        if (Knight == null)
        {
            Debug.LogError("Knight was not specified in Princess Inspector");
        }
        else
        {
            rope.connectedBody = Knight.gameObject.GetComponent <Rigidbody2D>();
            rope.enabled       = false;
        }

        if (Cage != null)
        {
            Cage.AddAreaListener(this);
        }

        CheckDirection();

        health.AddHealthListener(this);
    }