Cyber/Assets/Scripts/Character.cs
2017-05-07 22:44:35 +03:00

17 lines
557 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Character : SyncBase {
public float MovementSpeed = 5.0f;
public CharacterController CharacterController;
/// <summary>
/// Moves the character in the wanted direction. Should be called on the physics tick. (FixedUpdate)
/// </summary>
/// <param name="Direction">Movement direction.</param>
public void Move(Vector3 Direction) {
CharacterController.Move(Direction.normalized * MovementSpeed * Time.fixedDeltaTime);
}
}