示例#1
0
    void Start()
    {
        tilHlt = GameObject.Find("Grid").GetComponentInChildren <tileHealth>();


        plyr = GameObject.Find("player").transform;
        Transform GndOriginalPos = plyr.GetChild(3).GetComponent <Transform>();
        Vector3   x = GndOriginalPos.transform.right;
        Vector3   f = x + new Vector3(0f, throwYangle, 0);

        countdown = FuseTime;
        gndBody   = this.GetComponent <Rigidbody2D>();
        gndBody.AddForce(f * throwForce, ForceMode2D.Impulse);
    }
示例#2
0
    // Start is called before the first frame update
    void Start()
    {
        tilHlt = GameObject.Find("Grid").GetComponentInChildren <tileHealth>();

        countdown = FuseTime;
    }
示例#3
0
 void Start()
 {
     tilHlt     = GameObject.Find("Grid").GetComponentInChildren <tileHealth>();
     countdown  = FuseTime;
     BarrelBody = this.GetComponent <Rigidbody2D>();
 }