You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
468 B
18 lines
468 B
using UnityEngine;
|
|
|
|
namespace Asset_Cleaner {
|
|
public struct PrevClick {
|
|
const float DoubleClickTime = 0.5f;
|
|
Object _target;
|
|
float _timeClicked;
|
|
|
|
public PrevClick(Object target) {
|
|
_target = target;
|
|
_timeClicked = Time.realtimeSinceStartup;
|
|
}
|
|
|
|
public bool IsDoubleClick(Object o) {
|
|
return _target == o && Time.realtimeSinceStartup - _timeClicked < DoubleClickTime;
|
|
}
|
|
}
|
|
}
|