Ejemplo n.º 1
0
    void Start()
    {
        rb   = GetComponent <Rigidbody2D>();
        coll = GetComponent <CircleCollider2D>();
        sr   = GetComponent <SpriteRenderer>();

        State    = bstate.bsMoving;
        sr.color = new Color(Random.Range(0, 1.0f), Random.Range(0, 1.0f), Random.Range(0, 1.0f));
    }
Ejemplo n.º 2
0
    public void PopTheBall(bool GiveScore)
    {
        if (GiveScore)
        {
            PlayerController.ChangeScore(Score);
        }
        State        = bstate.bsDying;
        coll.enabled = false;

        Invoke("Kill", 0.2f);
    }