Example #1
0
    void Awake()
    {
        _collection = new PickableCollection(transform);

        foreach (Pickable pickable in content)
        {
            _collection.AddPickable(pickable);
        }
    }
Example #2
0
    protected override void readData(IMessageReader reader)
    {
        string[] pickableIds = reader.ReadStringArray();

        foreach (string pickableId in pickableIds)
        {
            Frame frame = Frame.FindFrameById(pickableId);

            if (frame != null)
            {
                Pickable equipable = frame.GetComponent <Pickable>();

                if (equipable != null)
                {
                    _collection.AddPickable(equipable);
                }
            }
        }
    }