This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class Grid : MonoBehaviour | |
{ | |
public static float gridSize = 0.5f; | |
public static Vector2 ToGrid( Vector2 point ) | |
{ | |
float xStep = Mathf.Floor((point.x / gridSize) + 0.5f); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[RequireComponent(typeof(Rigidbody2D))] | |
public abstract class TimeDilated : MonoBehaviour | |
{ | |
private float _time = 0; | |
public float localTime { get{ return _time; } set{_time = value;} } | |
public Vector2 velocity; | |
protected Vector2 _dilationForce = Vector2.zero; //acceleration | |
public Vector2 acceleration{ get{ return _dilationForce; } set { _dilationForce = value; } } |
NewerOlder