Removed all moving functionality
This commit is contained in:
@@ -8,11 +8,6 @@ namespace InterfaceOff
|
||||
public WindowInteractions Interactions { get; set; }
|
||||
public WindowComponents Components { get; set; }
|
||||
|
||||
protected Vector3 Velocity { get; set; }
|
||||
|
||||
[SerializeField] private int m_FlipCooldown;
|
||||
private static int MAX_FLIP_COOLDOWN = 20;
|
||||
|
||||
public void InstantiateWindowBase()
|
||||
{
|
||||
transform.position = CanvasManager.GetRandomPositionOnCanvas();
|
||||
@@ -20,22 +15,6 @@ namespace InterfaceOff
|
||||
OnWindowInstantiation();
|
||||
}
|
||||
|
||||
private void LateUpdate()
|
||||
{
|
||||
if (!CanvasManager.IsRectWithinCanvas(Components.Rect) && m_FlipCooldown == 0)
|
||||
{
|
||||
m_FlipCooldown = MAX_FLIP_COOLDOWN;
|
||||
Velocity = -Velocity;
|
||||
}
|
||||
|
||||
transform.position += Velocity * Time.deltaTime;
|
||||
}
|
||||
|
||||
private void FixedUpdate()
|
||||
{
|
||||
m_FlipCooldown = Math.Clamp(m_FlipCooldown - 1, 0, MAX_FLIP_COOLDOWN);
|
||||
}
|
||||
|
||||
public virtual void OnWindowInstantiation() { }
|
||||
public virtual void OnWindowClicked() { }
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@ namespace InterfaceOff
|
||||
public override void OnWindowInstantiation()
|
||||
{
|
||||
Components.WindowImage.color = Color.red;
|
||||
Velocity = new Vector3(100, 100, 0);
|
||||
}
|
||||
|
||||
public override void OnWindowClicked()
|
||||
|
||||
Reference in New Issue
Block a user