Exemplo n.º 1
0
 public static BuildSiteManager getInstance()
 {
     if (instance == null)
     {
         instance = new BuildSiteManager();
     }
     return(instance);
 }
Exemplo n.º 2
0
    void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }
        else if (instance != this)
        {
            Destroy(gameObject);
        }

        DontDestroyOnLoad(gameObject);
    }
Exemplo n.º 3
0
    public void handleEscape()
    {
        if (Input.GetKeyDown(KeyCode.Escape))
        {
            TowerManager.getInstance().disableDragSprite();
            TowerManager.getInstance().selectedTowerBtn = null;

            AccessoryManager.getInstance().disableDragSprite();
            AccessoryManager.getInstance().selectedAccessory = null;

            BuildSiteManager.getInstance().disableDragSprite();
            BuildSiteManager.getInstance().selectedBuildSiteBtn = null;
        }
    }