暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

123456789101112131415
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class Floor : MonoBehaviour
  5. {
  6. [SerializeField] float moveSpeed = 200f;
  7. void FixedUpdate() {
  8. transform.Translate(0,moveSpeed*Time.deltaTime,0);
  9. if(transform.GetComponent<RectTransform>().anchoredPosition.y > 0f){
  10. Destroy(gameObject);
  11. transform.parent.GetComponent<FloorManager>().SpawnFloor();
  12. }
  13. }
  14. }