public override void Update() { if (m_parent == null) { Elem.Remove(); return; } RoomHandler room; try { room = m_parent.transform.position.GetAbsoluteRoom(); } catch { room = null; } if (GameManager.Instance.IsPaused || room == null || (room.visibility == RoomHandler.VisibilityStatus.OBSCURED || room.visibility == RoomHandler.VisibilityStatus.REOBSCURED)) { Elem.Visible = false; return; } else { Elem.Visible = true; } Vector2 pos = Camera.main.WorldToScreenPoint(m_parent.sprite.WorldBottomCenter).XY(); pos.y = Screen.height - pos.y; Elem.Position = pos + m_offset; }
public void UpdateState() { foreach (List <IMixableComponent> Elem in Channels.Values) { for (int i = 0; i < Elem.Count; ++i) { if (Elem[i].Parent != this) { Elem.Remove(Elem[i]); } Elem[i].UpdateState(); } } }
public override void OnEnd() { Elem.Remove(); base.OnEnd(); }