Removed all moving functionality
This commit is contained in:
@@ -701,6 +701,7 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
<WindowImage>k__BackingField: {fileID: 1867692260}
|
||||
<Transform>k__BackingField: {fileID: 0}
|
||||
--- !u!114 &1867692263
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -800,7 +801,7 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
<SampleChild>k__BackingField: {fileID: 1867692258}
|
||||
<GameCanvas>k__BackingField: {fileID: 1539476654}
|
||||
<AutoSpawn>k__BackingField: 0
|
||||
<AutoSpawn>k__BackingField: 1
|
||||
--- !u!4 &2038986853
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -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