You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
889 B
33 lines
889 B
4 years ago
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
using UnityEngine.UI;
|
||
|
|
||
|
public class ModeImageLoad : MonoBehaviour
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 是否是演习图片
|
||
|
/// </summary>
|
||
|
public bool IsDrillPanel;
|
||
|
// Start is called before the first frame update
|
||
|
void Start()
|
||
|
{
|
||
|
if (IsDrillPanel)
|
||
|
{
|
||
|
Texture2D tex = Resources.Load<Texture2D>("Common/DrillImage");
|
||
|
GetComponent<Image>().sprite = Sprite.Create(tex, new Rect(0, 0, tex.width, tex.height), Vector2.one * 0.5f);
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
Texture2D tex = Resources.Load<Texture2D>("Common/ExerciseImage");
|
||
|
GetComponent<Image>().sprite = Sprite.Create(tex, new Rect(0, 0, tex.width, tex.height), Vector2.one * 0.5f);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// Update is called once per frame
|
||
|
void Update()
|
||
|
{
|
||
|
|
||
|
}
|
||
|
}
|