コード例 #1
0
        private void CreateMinimap(BaseGraphView view)
        {
            _miniMapView = CreateGraphView(() => new MiniMapView(view), _miniMapView);
            _miniMapView.SetPosition(new Rect(_minimapPosition, _miniMapView.GetPosition().size));

            view.Add(_miniMapView);
        }
コード例 #2
0
 public void DrawMinimap(SpriteBatch spriteBatch, int x, int y)
 {
     if (Icons.Contains(MiniMapView))
     {
         MiniMapView.DrawMap(spriteBatch, x, y);
     }
 }
コード例 #3
0
    public void OnCreate()
    {
        view = MiniMapView.Instance;

        elementDataDict = new Dictionary <int, MiniMapElementIconType>();

        MiniMapMessageDispatcher.AddElementObserver(MiniMapElementStateType.Update, MoveElementGameObjectListener);

        MiniMapMessageDispatcher.AddElementObserver(MiniMapElementStateType.Create, AddElementDataListener);
        MiniMapMessageDispatcher.AddElementObserver(MiniMapElementStateType.Update, UpdateElementDataListener);
        MiniMapMessageDispatcher.AddElementObserver(MiniMapElementStateType.Destroy, RemoveElementDataListener);
    }
コード例 #4
0
    void Awake()
    {
        instance = this;

        controller = new MiniMapController();

        poolManager = GetComponent <MiniMapPoolManager>();

        miniMapSize = transform.GetComponent <RectTransform>().sizeDelta;

        elementIconDict = new Dictionary <int, Transform>();

        elementIconParent = transform.FindChild("Mask/ElementParent").transform;

        controller.OnCreate();
    }