Exemplo n.º 1
0
    public void OnDirectionInitialized(TileDirectionEventData eventData)
    {
        switch (eventData.m_Direction)
        {
        case Direction.LEFT:
            FaceLeft(snap: true);
            break;

        case Direction.RIGHT:
            FaceRight(snap: true);
            break;

        default:
            // eventually something may go here
            break;
        }
    }
Exemplo n.º 2
0
  void SetHelper(Direction direction, bool initialize = false)
  {
    m_Direction = direction;
    m_Element.m_Direction = direction;

    DirectionSet?.Invoke(direction);

    var eventData = new TileDirectionEventData()
    {
      m_Direction = direction,
    };

    if (initialize)
      m_Events.DirectionInitialized.Invoke(eventData);
    else
      m_Events.DirectionSet.Invoke(eventData);
  }
Exemplo n.º 3
0
 public void OnDirectionInitialized(TileDirectionEventData eventData)
 {
     m_FacingDirection = eventData.m_Direction;
 }