public void Update()
{
float horz = Input.GetAxis("Horizontal") * speed;
float vert = Input.GetAxis("Vertical") * speed;
GetComponent<Rigidbody>().AddForce( new Vector3( horz, 0, vert ) );
if (Input.GetKeyDown(KeyCode.G) ) {
takeDamage(1f);
}
}
void Update() { character.Update(); }