admin 管理员组文章数量: 1087652
见缝插针实例
Pin
下面展示一些 内联代码片
。
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;public class Pin : MonoBehaviour
{public float speed = 20f;private Rigidbody2D rb;private float ready;private bool Isready=true;// Start is called before the first frame updatevoid Start(){rb = GetComponent<Rigidbody2D>();rb.velocity = Vector2.up * speed;}// Update is called once per framevoid Update(){}void OnTriggerEnter2D(Collider2D col){if (col.tag =="Rotator"){rb.velocity = Vector2.zero;if (Random.Range(0f, 1f) > 0.5f){if (col.GetComponent<Rotato>().speed > 0){col.GetComponent<Rotato>().speed = -90;}else{col.GetComponent<Rotato>().speed *= -1;}}else if (col<
本文标签: 见缝插针实例
版权声明:本文标题:见缝插针实例 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.roclinux.cn/p/1700300613a386704.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论