コード例 #1
0
        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;
        }
コード例 #2
0
 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();
         }
     }
 }
コード例 #3
0
ファイル: SShrinkAnimation.cs プロジェクト: thswogur00/ETGMod
 public override void OnEnd()
 {
     Elem.Remove();
     base.OnEnd();
 }