Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- public class EnemyBehaviour : MonoBehaviour {
- public Rigidbody2D rd;
- // Use this for initialization
- void Start () {
- rd = GetComponent<Rigidbody2D> ();
- Vector3 targetDirection = Random.insideUnitSphere * 5;
- targetDirection.z = 0;
- rd.velocity = targetDirection;
- }
- // Update is called once per frame
- void Update () {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment