18 lines
598 B
C#
18 lines
598 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class PhysicButton : MonoBehaviour
|
|
{
|
|
[SerializeField]
|
|
private PhysicButtonContent physicButtonContent;
|
|
public PhysicButtonContent PhysicButtonContent { get { if (physicButtonContent == null) physicButtonContent = transform.parent.GetComponentInChildren<PhysicButtonContent>();return physicButtonContent; } }
|
|
|
|
public PhysicButtonType buttonType;
|
|
private void OnMouseDown()
|
|
{
|
|
if (EventUtilities.IsOverUI) return;
|
|
PhysicButtonContent.OnPhysicButtonDown(buttonType);
|
|
}
|
|
}
|