Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package nl.mostwantit.two;
- class GlobalConfig
- {
- private static var keys:Array<String>;
- private static var vars:Array<Dynamic>;
- public static function set(key:String, value:Dynamic):Void
- {
- if(vars == null)
- {
- vars = new Array<Dynamic>();
- keys = new Array<String>();
- }
- if(Lambda.indexOf(keys, key) == -1)
- {
- vars.push(value);
- keys.push(key);
- }
- else
- {
- vars[Lambda.indexOf(keys, key)] = value;
- }
- }
- public static function get(key:String):Dynamic
- {
- if(vars == null) return null;
- if(Lambda.indexOf(keys, key) == -1) return null;
- return vars[Lambda.indexOf(keys, key)];
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement