37 lines
977 B
C#
37 lines
977 B
C#
using Assets.Scripts;
|
|
using Assets.Scripts.Apis.Models;
|
|
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class NewRouteItemController : MonoBehaviour
|
|
{
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
|
|
public void Initial(MapRouteAreaItem area, Dictionary<string, Texture> caches = null)
|
|
{
|
|
if (area.CoverImage != null)
|
|
{
|
|
Utils.DisplayImageTempDict(GetComponent<RawImage>(), area.CoverImage, caches);
|
|
}
|
|
transform.Find("Panel/Text").GetComponent<Text>().text = area.Name;
|
|
UIManager.AddEvent(gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b =>
|
|
{
|
|
UIManager.ShowNewRouteDetailPanel(area);
|
|
//ConfigHelper.mapApi.GetMapRouteAreaDetail(area.Id, 0, 10);
|
|
});
|
|
}
|
|
}
|