package com.sheep.gamegroup.util;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by realicing on 2018/10/16.
 * realicing@sina.com
 */
public class ActionUtil {
    private static ActionUtil instance = new ActionUtil();
    private ActionUtil(){

    }

    public static ActionUtil getInstance() {
        return instance;
    }

    //-----------------------------------------下一动作部分-----------------------------------------------------结束
    private Map<String, Object> nextActionMap = new HashMap<>();
    public void addNextAction(String key, Object item) {
        nextActionMap.put(key, item);
    }

    public Object getAction(String key) {
        Object action = nextActionMap.get(key);
        if(action != null)
            nextActionMap.remove(key);
        return action;
    }
    //-----------------------------------------下一动作部分-----------------------------------------------------结束
}
