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); }
// Start is called before the first frame update void Start() { tilHlt = GameObject.Find("Grid").GetComponentInChildren <tileHealth>(); countdown = FuseTime; }
void Start() { tilHlt = GameObject.Find("Grid").GetComponentInChildren <tileHealth>(); countdown = FuseTime; BarrelBody = this.GetComponent <Rigidbody2D>(); }