Example #1
0
    public void closeDialog()
    {
        SoundCtrl.getInstance().playSoundUI();
        RulePanelScript self = GetComponent <RulePanelScript> ();

        self = null;
        Destroy(this);
        Destroy(gameObject);
    }
Example #2
0
    public void closeDialog()
    {
        RulePanelScript self = GetComponent <RulePanelScript> ();

        for (int i = 0; i < titleImags.Count; i++)
        {
            GameObject item = titleImags [i];
            Destroy(item);
        }
        Destroy(self.ruleContent);

        self = null;
        Destroy(this);
        Destroy(gameObject);
    }