31 lines
738 B
C#
31 lines
738 B
C#
using GUPS.AntiCheat.Protected;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class LuckyGameObj : MonoBehaviour
|
|
{
|
|
public Image m_image;
|
|
public GameObject go_effect;
|
|
|
|
ProtectedInt32 m_Amount;
|
|
|
|
public void Init(Vector3 pos)
|
|
{
|
|
m_image.enabled = true;
|
|
go_effect.SetActive(false);
|
|
m_Amount = 1; m_Amount.Obfuscate();
|
|
transform.localPosition = pos;
|
|
}
|
|
|
|
private void OnCollisionEnter2D(Collision2D collision)
|
|
{
|
|
if (collision == null) return;
|
|
|
|
if (collision.collider.tag == "Player")
|
|
{ // 재화 획득
|
|
LobbyUI.Ins.m_Game_Lucky.Add_Amount(m_Amount);
|
|
m_image.enabled = false;
|
|
go_effect.SetActive(true);
|
|
}
|
|
}
|
|
} |