示例#1
0
    public void ChildOnCollisionEnter(Collider col)
    {
        //Debug.Log(canEat);
        if (col.gameObject.tag == "Enemy" && canEat)
        {
            this.gameObject.transform.localScale +=
                new Vector3(upScale, upScale, upScale); // その割ったスケールをプレイヤーに足す
            playerStatus.RecoveryHangry(enemyScale);    // 腹減り度の回復
            smoothFollow.ChangeDistance(upScale / 1.5f);
            eatClick = false;
            canEat   = false;

            enemMark = null;
            Destroy(col.gameObject);
        }
        else if (col.gameObject.tag == "Enemy" && !canEat)
        {   // 敵のほうが大きかったら死亡
            //chara.SetActive(false);
            playerStatus.DeadType(true);
            playerStatus.DamageHangry(150);
        }
    }