using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class maodian : MonoBehaviour {
public Image o;
float oo=3.35f;
float ooo = 350.2f;
float tim;
bool panduan = true;
// Use this for initialization
void Start () {
tim = Time.time + 0.1f;
}
// Update is called once per frame
void Update () {
if (Time.time>tim&&panduan)
{
print(tim);
oo -= 3;
ooo -= 6;
tim += 0.1f;
if (oo<=-166)
{
Destroy(o);
panduan = false;
}
}
o.GetComponent<RectTransform>().anchoredPosition = new Vector2(106.8f, oo);//改变pos.y的大小
o. GetComponent<RectTransform>().sizeDelta = new Vector2(597.8f, ooo);//改变height的大小
}
}