using UnityEngine; using System.Collections; public class Flipped : MonoBehaviour { // Update is called once per frame void Update () { Rigidbody2D rigid = gameObject.GetComponent<Rigidbody2D> (); rigid.velocity = new Vector2 (1, 0); } }
using UnityEngine; using System.Collections; public class Flipped : MonoBehaviour { // Update is called once per frame void Update () { Rigidbody2D rigid = gameObject.GetComponent<Rigidbody2D> (); rigid.velocity = new Vector2 (1, 0); } }
转载于:https://www.cnblogs.com/yufenghou/p/4354790.html