示例#1
0
文件: Door.cs 项目: aaaivan/999AD
 public Door(Point _position, TextureType _type, Collectable.ItemType _key)
 {
     ID = IDcounter;
     IDcounter++;
     position    = _position;
     key         = _key;
     textureType = _type;
     closed      = true;
 }
示例#2
0
 //if is in the inventory, remove collectable of specified type
 public static bool TryRemoveFromInventory(Collectable.ItemType itemType, Vector2 _targetPoint)
 {
     for (int i = collectedItems.Count - 1; i >= 0; i--)
     {
         if (collectedItems[i].type == itemType)
         {
             itemsBeingUsed.Add(collectedItems[i]);
             targetPoints.Add(_targetPoint);
             collectedItems.RemoveAt(i);
             return(true);
         }
     }
     return(false);
 }