コード例 #1
0
    void OnSymbolsChanged(object sender, SymbolEventArgs e)
    {
        if(e.SymbolChain == string.Empty){

            clear();
            return;
        }

        char symbol =  e.SymbolChain[e.SymbolChain.Length-1];
        Panel sign = ResourceManager.CreateInstance<GameObject>("Symbols/Sign"+symbol).GetComponent<Panel>();
        if(sign == null)
            EditorDebug.LogError("Sign " + symbol + " is unkown");
        else{
            symbols.Add(sign);
            sign.transform.parent = this.transform;
            sign.CreateElement();
            sign.UpdateParent();
            updateSymbolChain();
            activeScreen.UpdateElement(); // Update Screeen because of new Objects
        }
    }
コード例 #2
0
    private void InvokeSymbolsChanged()
    {
        var handler = SymbolsChanged;
        if (handler == null) {
            return;
        }

        var e = new SymbolEventArgs(symbolChain);
        SymbolsChanged(this, e);
    }
コード例 #3
0
 // Event Handling
 private void OnSymbolChanged(object sender, SymbolEventArgs e)
 {
     if (string.IsNullOrEmpty(e.SymbolChain)) {
         DarkenSymbols();
         return;
     }
     HighlightSymbols(e.SymbolChain);
 }