SpillContents() публичный Метод

public SpillContents ( ) : void
Результат void
Пример #1
0
    void OnDeath()
    {
        Conversation cnv = this.GetComponent <Conversation>();

        if (cnv != null)
        {
            if (cnv.OnDeath() == true)
            {
                return;
            }
        }

        NPC_DEAD = true;
        //Dump items on the floor.
        //
        Container cnt = this.GetComponent <Container>();

        if (cnt != null)
        {
            Debug.Log("Spilling " + this.name);
            cnt.SpillContents();            //Spill contents is still not 100% reliable so don't expect to get all the items you want.
        }
        else
        {
            Debug.Log("no container to spill");
        }
    }