37 lines
1.1 KiB
C#
37 lines
1.1 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
namespace game
|
|
{
|
|
public class PinballScoringWidgetBase : MonoBehaviour
|
|
{
|
|
#region 数据
|
|
public int Number = 5; // 分数
|
|
public Rigidbody2D Rigidbody2D; // 2D刚体
|
|
public PhysicsMaterial2D ValidMaterial; // 有效材质
|
|
public PhysicsMaterial2D InvalidMaterial; // 无效材质
|
|
protected EventPinballBonusType m_BonusType = EventPinballBonusType.TypeScore;
|
|
public EventPinballBonusType BonusType { get => m_BonusType; }
|
|
public virtual string GetTip()
|
|
{
|
|
return "";
|
|
}
|
|
public void ResetValidMaterial()
|
|
{
|
|
if (Rigidbody2D != null && ValidMaterial != null)
|
|
{
|
|
Rigidbody2D.sharedMaterial = ValidMaterial;
|
|
}
|
|
}
|
|
public void SetInvalidMaterial()
|
|
{
|
|
if (Rigidbody2D != null && InvalidMaterial != null)
|
|
{
|
|
Rigidbody2D.sharedMaterial = InvalidMaterial;
|
|
}
|
|
}
|
|
#endregion
|
|
}
|
|
}
|