Exemplo n.º 1
0
    public static void DestroyNode <T>(AnimationGraphSystem animGraphSys, NodeHandle <T> handle) where T : INodeDefinition, new()
    {
        animGraphSys.Set.Destroy(handle);
        GameDebug.Log(animGraphSys.World, ShowLifetime, "Destroy node. hash:{0}", handle.GetHashCode());

        if (!GetData(animGraphSys).Nodes.ContainsKey(handle.GetHashCode()))
        {
            GameDebug.LogError("Node is not registered");
            return;
        }

        GetData(animGraphSys).Nodes.Remove(handle.GetHashCode());
    }