Exemple #1
0
    private void ApplySymbol(ASymbol symbol)
    {
        AState previous = current;

        current = current.ApplySymbol(symbol);

        if (previous != current)
        {
            // change script
            Destroy(currentBehaviour);
            currentBehaviour = gameObject.AddComponent(current.Behaviour) as MonoBehaviour;
        }
    }