You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.1 KiB
C#
41 lines
1.1 KiB
C#
using UnityEngine;
|
|
using Autohand;
|
|
|
|
public class PlacePointEventTemplate : MonoBehaviour {
|
|
public PlacePoint placePoint;
|
|
|
|
void OnEnable() {
|
|
placePoint.OnPlaceEvent += OnPlace;
|
|
placePoint.OnRemoveEvent += OnPlace;
|
|
placePoint.OnHighlightEvent += OnHighlight;
|
|
placePoint.OnStopHighlightEvent += OnStopHighlight;
|
|
}
|
|
|
|
private void OnDisable() {
|
|
placePoint.OnPlaceEvent -= OnPlace;
|
|
placePoint.OnRemoveEvent -= OnPlace;
|
|
placePoint.OnHighlightEvent -= OnHighlight;
|
|
placePoint.OnStopHighlightEvent -= OnStopHighlight;
|
|
|
|
}
|
|
|
|
|
|
public void OnPlace(PlacePoint point, Grabbable grab) {
|
|
//Stuff happens when placed
|
|
}
|
|
|
|
|
|
public void OnRemove(PlacePoint point, Grabbable grab) {
|
|
//Stuff happens when placed was removed
|
|
|
|
}
|
|
public void OnHighlight(PlacePoint point, Grabbable grab) {
|
|
//Stuff happens when placepoint was highlighted
|
|
|
|
}
|
|
|
|
public void OnStopHighlight(PlacePoint point, Grabbable grab) {
|
|
//Stuff happens when placepoint was done highlighting
|
|
}
|
|
}
|