Added a new moving window type
This commit is contained in:
@@ -7,11 +7,21 @@ namespace InterfaceOff
|
||||
public WindowInteractions Interactions { get; set; }
|
||||
public WindowComponents Components { get; set; }
|
||||
|
||||
public Vector3 Velocity { get; set; }
|
||||
|
||||
public void InstantiateWindowBase()
|
||||
{
|
||||
transform.position = CanvasManager.GetRandomPositionOnCanvas();
|
||||
|
||||
OnWindowInstantiation();
|
||||
}
|
||||
|
||||
|
||||
public void LateUpdate()
|
||||
{
|
||||
transform.position += Velocity * Time.deltaTime;
|
||||
}
|
||||
|
||||
public virtual void OnWindowInstantiation() { }
|
||||
public virtual void OnWindowClicked() { }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user