Commit f7172a18 authored by Luke A Smith's avatar Luke A Smith

Merge branch 'ShootScript' into 'master'

Wrote shootStuff  Shoots stuff

See merge request !33
parents fcf4c784 d57b5c78
using UnityEngine;
using System.Collections;
public class ShootSuff : MonoBehaviour {
public void Shoot(GameObject bul, Vector2 dir, float force = 1)
{
GameObject go = Instantiate(bul, transform.position, transform.rotation) as GameObject;
Rigidbody2D rb2d = go.GetComponent<Rigidbody2D>();
rb2d.AddForce(dir * force);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment