コード例 #1
0
    // Update is called once per frame
    void Update()
    {
        Stage2_IceScript ice = Ice_Break.GetComponent <Stage2_IceScript>();

        if (ice.Ice_Count == 0)
        {
            anim.SetBool("Tobasu", true);
        }
    }
コード例 #2
0
    void OnTriggerEnter2D(Collider2D other)
    {
        //Debug.Log("Enter : " + other.gameObject.name);
        hit = other.gameObject;
        Stage2_IceScript ice = GetComponent <Stage2_IceScript>();

        if (hit.gameObject.CompareTag("Rock"))
        {
            ice.Ice_Count--;
        }
    }