Ejemplo n.º 1
0
    ////装备相关//////
    public void playerAddEquipment(GameObject player, GameObject item)
    {
        charlogic charLogic = player.GetComponent <charlogic> ();

        if (charLogic.equipItem(item))
        {
            monsterbaselogic baseLogic = item.GetComponent <monsterbaselogic> ();
            baseLogic.destroy();
        }
    }
Ejemplo n.º 2
0
    //捡道具
    private void eatItem(GameObject player, GameObject item)
    {
        //Debug.Log ("mapLogic eatItem");
        charlogic charLogic = player.GetComponent <charlogic> ();

        if (charLogic.grapItem(item.gameObject))
        {
            monsterbaselogic baseLogic = item.GetComponent <monsterbaselogic> ();
            baseLogic.destroy();
        }
    }