using UnityEngine;
using System.Collections;
public class player : MonoBehaviour {
public int x;
public int y;
public int z;
private int speed = 5;
public Rigidbody sphere;
public Transform barrel;
public float time = 0.5F;
void timer(){
object clock;
clock = new WaitForSeconds (time);
}
// Use this for initialization
void Start () {
transform.position = new Vector3 (x, y, z);
}
// Update is called once per frame
void update () {
transform.Translate (Vector3.right * Input.GetAxis ("Horizontal") * speed * Time.deltaTime);
transform.Translate (Vector3.forward * Input.GetAxis ("Vertical") * speed * Time.deltaTime);
transform.Translate (Vector3.up * Input.GetAxis("Jump") * speed * Time.deltaTime);
if (Input.GetButtonDown("Fire1")){
Rigidbody clone;
clone = Instantiate(sphere, barrel.position, barrel.rotation)as Rigidbody;
}
}
}