Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public var items : System.Collections.HashSet.<System.String>;
- public var inv : System.Collections.HashSet.<System.String>;
- function Start() {
- items = new System.Collections.HashSet.<System.String>();
- inv = new System.Collections.HashSet.<System.String>();
- items.Add("Apple");
- items.Add("Condom");
- items.Add("Bottle of Vodka");
- items.Add(".50 Hand Gun");
- // ^-- a good night out
- }
- function AddItem() {
- if(items.Contains("Apple") && !inv.Contains("Apple"))
- {
- items.Remove("Apple");
- inv.Add("Apple");
- }
- }
Add Comment
Please, Sign In to add comment