public void OnExitTreeSlot(TreeSlot ts) { isOverFreeTreeSlot = false; if (isHoldingDecoration) { currentPS.decoration.transform.SetParent(null); currentPS.decoration.transform.localRotation = Quaternion.Euler(new Vector3(0, 180, 0)); currentPS.decoration.transform.localScale = Vector3.one; } currentTS = null; }
public void OnEnterTreeSlot(TreeSlot ts) { if (isHoldingDecoration && ts.isFree) { isOverFreeTreeSlot = true; currentTS = ts; currentPS.decoration.transform.SetParent(ts.transform); currentPS.decoration.transform.localPosition = Vector3.zero; currentPS.decoration.transform.localRotation = Quaternion.identity; currentPS.decoration.transform.localScale = Vector3.one; } }