Files
TaiWan/Assets/ZX/ZX10/SpotInfo.cs
2025-10-31 15:20:38 +08:00

73 lines
1.3 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// 展示点数据
/// </summary>
public class SpotInfo : MonoBehaviour
{
/// <summary>
/// 场景标题
/// </summary>
public string sceneTitle;
/// <summary>
/// 内容标题
/// </summary>
public string title;
/// <summary>
/// 内容详细
/// </summary>
public string detailInfo;
/// <summary>
/// 字体大小
/// </summary>
public int fontSize = 45;
/// <summary>
/// 模型旋转方向
/// </summary>
public Vector3 rotateDir = Vector3.up;
/// <summary>
/// 模型默认角度
/// </summary>
public Vector3 rotateAngle;
/// <summary>
/// 是否包含模型
/// </summary>
public bool showModel;
/// <summary>
/// 展示点图片
/// </summary>
public Sprite spDetail;
/// <summary>
/// 展示品动画(如果有的话)
/// </summary>
public Animator anim;
/// <summary>
/// 展示品Transform如果直接放在Spot下可不设置
/// </summary>
public Transform tranModel;
private void Start()
{
if(anim == null)
{
anim = GetComponent<Animator>();
}
}
void OnMouseDown()
{
XMZJController.Instance.ShowInfo(this);
}
}