using UnityEngine;
using System.Collections;

public class addFore : MonoBehaviour {

    private GameObject box;

    // Use this for initialization
    void Start () {
        box = GameObject.Find ("1");
    }
    
    // Update is called once per frame
    void Update () {
    
    }

    void FixedUpdate()
    {

        box.GetComponent<Rigidbody2D>().AddForce(new Vector2(0f, 10f));
    }
}

 

相关文章:

  • 2022-12-23
  • 2021-06-30
  • 2022-12-23
  • 2022-01-02
  • 2022-12-23
  • 2022-12-23
  • 2021-11-17
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-28
  • 2022-01-09
  • 2022-12-23
  • 2021-06-16
相关资源
相似解决方案