public void UpdateSEAComponentChain(ISEAComponent sea_system) { /* * This gets called everytime a system piece finishes updating, * It will trigger dependent system pieces to update as well */ SetupSEAComponentUpdateChain(); if (updateChain == null) { updateChain = new Dictionary <ISEAComponent, List <ISEAComponent> >(); } if (updateChain.ContainsKey(sea_system)) { List <ISEAComponent> toCall = updateChain[sea_system]; foreach (ISEAComponent s in toCall) { s.UpdateSEAComponent(); } } }
void SetupUpdateChainItem(ISEAComponent caller, List <ISEAComponent> callees) { if (updateChain.ContainsKey(caller)) { updateChain[caller] = callees; } else { updateChain.Add(caller, callees); } }