Пример #1
0
    void OnMouseExit()
    {
        Material[] mat = this.GetComponent <Renderer>().materials;
        mat[1] = primaryMaterial;
//		GameObject ButtonScripts = GameObject.Find ("ButtonsCanvas");
//		ButtonScripts buttonScripts = ButtonScripts.GetComponent<ButtonScripts> ();
        GameObject     HighlightTiles = GameObject.Find("_Scripts");
        HighlightTiles highlightTiles = HighlightTiles.GetComponent <HighlightTiles> ();

        canAttack = false;
        if (buttonScripts.coneSelected || buttonScripts.drawSelected || buttonScripts.changeAreaTiles || buttonScripts.changeAreaTilesNoMid || buttonScripts.moveSelected)
        {
            highlightTiles.HideAllowedTiles();
        }
    }