示例#1
0
    private void SetDisposition(EntityOLD e, EntityOLD.Disposition d)
    {
        KeyValuePair <EntityOLD, EntityOLD.Disposition> newEntry = new KeyValuePair <EntityOLD, EntityOLD.Disposition>(e, d);

        RemoveNearbyEntity(e);
        nearbyEntities.Add(newEntry);
    }
示例#2
0
    public List <EntityOLD> GetNearbyEntitiesOfDisposition(EntityOLD.Disposition d)
    {
        List <EntityOLD> list = new List <EntityOLD>();

        foreach (KeyValuePair <EntityOLD, EntityOLD.Disposition> kvp in nearbyEntities)
        {
            if (kvp.Value == d)
            {
                list.Add(kvp.Key);
            }
        }
        return(list);
    }