Mover Cs
Mover Cs
Collections;
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// Mover the game object back and forth
/// </summary>
public class Mover : MonoBehaviour
{
#region Fields
// direction-changing support
Timer directionTimer;
int directionMultiplier = 1;
#endregion
/// <summary>
/// Gets and sets the position of the game object
/// </summary>
public Vector3 Position
{
get { return transform.position; }
set { transform.position = value; }
}
/// <summary>
/// Gets the direction timer so the autograder can
/// update the timer every frame
/// </summary>
public Timer DirectionTimer
{
get { return directionTimer; }
}
#endregion
/// <summary>
/// Start is called before the first frame update
/// </summary>
public void Start()
{
// set position of game object for autograder
transform.position = new Vector3(-2.5f, 0, 0);
#endregion
}