Пример #1
0
    void OnCollisionEnter2D(Collision2D target)
    {
        //Debug.Log ("deadly wall collision detected");

        if (target.gameObject.tag == "Bucket")
        {
            _bucketcount = _gamer._bucket;
            //Debug.Log ("current bucket is " + _bucketcount.ToString ());
            _gamer.Addtotal(_bucketcount);
            _gamer.Resetbucket();
        }

        if (target.gameObject.tag == "Block")
        {
            _gamer.Addbucket();
            Destroy(target.gameObject);
        }
    }