Exemplo n.º 1
0
 public void HighLightIndicator(MapCellIndicator cellIndicator)
 {
     if (selectIndicator != null)
     {
         selectIndicator.SetHighLight(false);
     }
     selectIndicator = cellIndicator;
 }
        private Sprite GetMapIndicatorSprite(MapCellIndicator cellIndicator)
        {
            switch (cellIndicator)
            {
            case MapCellIndicator.None:
                return(null);

            case MapCellIndicator.Death:
                return(m_resources.mapCellIndicatorDeathIcon);

            default:
                throw new ArgumentOutOfRangeException("cellIndicator", cellIndicator, null);
            }
        }
Exemplo n.º 3
0
 public void ResetState()
 {
     state = State.Area;
     foreach (var k in canMoveArea)
     {
         k.indicator.gameObject.SetActive(false);
         k.steps = MapCell.MaxStep;
         k.prev  = null;
         indicators.Return(k.indicator);
     }
     if (selectIndicator)
     {
         selectIndicator.SetHighLight(false);
     }
     selectIndicator = null;
     AutoSelectPlayer();
 }
        public unsafe void SetCellIndicator(MapCellIndicator cellIndicator)
        {
            //IL_0087: Unknown result type (might be due to invalid IL or missing references)
            //IL_0091: Expected O, but got Unknown
            //IL_0102: Unknown result type (might be due to invalid IL or missing references)
            //IL_010c: Expected O, but got Unknown
            if (cellIndicator == m_mapCellIndicator)
            {
                return;
            }
            switch (m_tweenState)
            {
            case TweenState.None:
                if (m_mapCellIndicator == MapCellIndicator.None)
                {
                    m_mapCellIndicatorRenderer.set_sprite(GetMapIndicatorSprite(cellIndicator));
                    m_mapCellIndicatorRenderer.set_enabled(true);
                    m_tweenState            = TweenState.Showing;
                    m_mapCellIndicatorTween = TweenSettingsExtensions.OnComplete <TweenerCore <float, float, FloatOptions> >(DOTween.To(new DOGetter <float>((object)this, (IntPtr)(void *) /*OpCode not supported: LdFtn*/), new DOSetter <float>((object)this, (IntPtr)(void *) /*OpCode not supported: LdFtn*/), 1f, 0.2f), new TweenCallback((object)this, (IntPtr)(void *) /*OpCode not supported: LdFtn*/));
                    m_mapCellIndicator      = cellIndicator;
                    return;
                }
                break;

            case TweenState.Showing:
                TweenExtensions.Kill(m_mapCellIndicatorTween, false);
                break;

            case TweenState.Hiding:
                m_mapCellIndicator = cellIndicator;
                return;

            default:
                throw new ArgumentOutOfRangeException();
            }
            float num = Mathf.Lerp(0f, 0.2f, m_mapCellIndicatorAlpha);

            m_tweenState            = TweenState.Hiding;
            m_mapCellIndicatorTween = TweenSettingsExtensions.OnComplete <TweenerCore <float, float, FloatOptions> >(DOTween.To(new DOGetter <float>((object)this, (IntPtr)(void *) /*OpCode not supported: LdFtn*/), new DOSetter <float>((object)this, (IntPtr)(void *) /*OpCode not supported: LdFtn*/), 0f, num), new TweenCallback((object)this, (IntPtr)(void *) /*OpCode not supported: LdFtn*/));
            m_mapCellIndicator      = cellIndicator;
        }
        public override void CheckParentCellIndicator()
        {
            //IL_0035: Unknown result type (might be due to invalid IL or missing references)
            //IL_003a: Unknown result type (might be due to invalid IL or missing references)
            CellObject cellObject = m_cellObject;

            if (null == cellObject)
            {
                m_uiContainer.SetCellIndicator(MapCellIndicator.None);
                return;
            }
            IMap parentMap = cellObject.parentMap;

            if (parentMap == null)
            {
                m_uiContainer.SetCellIndicator(MapCellIndicator.None);
                return;
            }
            Vector2Int       coords        = cellObject.coords;
            MapCellIndicator cellIndicator = parentMap.GetCellIndicator(coords.get_x(), coords.get_y());

            m_uiContainer.SetCellIndicator(cellIndicator);
        }