This commit is contained in:
parent
740f15a66d
commit
8906dd795d
|
|
@ -197,9 +197,10 @@ public class Game_Lucky : MonoBehaviour
|
|||
texts_money[2].text = dic_Amount[eMoney.Gacha].ToString();
|
||||
}
|
||||
|
||||
public void Add_Amount(eMoney money)
|
||||
public void Add_Amount(eMoney money, int amount)
|
||||
{
|
||||
++dic_Amount[money]; dic_Amount[money].Obfuscate();
|
||||
dic_Amount[money] += amount;
|
||||
dic_Amount[money].Obfuscate();
|
||||
Set_Texts();
|
||||
|
||||
++m_BubbleAmount;
|
||||
|
|
@ -391,7 +392,7 @@ public class Game_Lucky : MonoBehaviour
|
|||
isRefill = false;
|
||||
}
|
||||
|
||||
public void Add_Ball(Vector3 pos)
|
||||
public void Add_Ball(eMoney money, Vector3 pos)
|
||||
{
|
||||
for (int i = 0; i < tf_addobjs.childCount; i++)
|
||||
{
|
||||
|
|
@ -399,7 +400,7 @@ public class Game_Lucky : MonoBehaviour
|
|||
if (!child.gameObject.activeInHierarchy)
|
||||
{
|
||||
list_dropobj.Add(child.gameObject);
|
||||
child.GetComponent<LuckyGameObj>().Init_Add(pos, tf_fallobjs);
|
||||
child.GetComponent<LuckyGameObj>().Init_Add(money, pos, tf_fallobjs);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,30 +40,31 @@ public class LuckyGameObj : MonoBehaviour
|
|||
}
|
||||
|
||||
public void Init(eMoney money, Vector3 pos, Transform tfcupin, Transform tffallobjs)
|
||||
{
|
||||
transform.parent = tfcupin;
|
||||
Init_Common(money, pos, tffallobjs);
|
||||
|
||||
isRandomBlock = isCollision = false;
|
||||
m_Collider2D.enabled = isInCup = m_image.enabled = true;
|
||||
}
|
||||
public void Init_Add(eMoney money, Vector3 pos, Transform tffallobjs)
|
||||
{
|
||||
transform.parent = tffallobjs;
|
||||
Init_Common(money, pos, tffallobjs);
|
||||
|
||||
isInCup = isCollision = false;
|
||||
isRandomBlock = m_Collider2D.enabled = m_image.enabled = true;
|
||||
|
||||
}
|
||||
void Init_Common(eMoney money, Vector3 pos, Transform tffallobjs)
|
||||
{
|
||||
gameObject.SetActive(true);
|
||||
|
||||
m_Money = money;
|
||||
transform.parent = tfcupin;
|
||||
transform.localPosition = pos;
|
||||
tf_fallobjs = tffallobjs;
|
||||
|
||||
m_image.sprite = UIAtlasMgr.Ins.Get_Sprite(m_Money);
|
||||
isRandomBlock = isCollision = false;
|
||||
m_Collider2D.enabled = isInCup = m_image.enabled = true;
|
||||
go_effect.SetActive(false);
|
||||
m_Rigidbody2D.bodyType = RigidbodyType2D.Dynamic;
|
||||
}
|
||||
public void Init_Add(Vector3 pos, Transform tffallobjs)
|
||||
{
|
||||
gameObject.SetActive(true);
|
||||
|
||||
transform.parent = tffallobjs;
|
||||
transform.localPosition = pos;
|
||||
tf_fallobjs = tffallobjs;
|
||||
|
||||
isInCup = isCollision = false;
|
||||
isRandomBlock = m_Collider2D.enabled = m_image.enabled = true;
|
||||
go_effect.SetActive(false);
|
||||
m_Rigidbody2D.bodyType = RigidbodyType2D.Dynamic;
|
||||
}
|
||||
|
|
@ -106,7 +107,7 @@ public class LuckyGameObj : MonoBehaviour
|
|||
var addAmount = lrb.Get_Value(1);
|
||||
for (int i = 0; i < addAmount - 1; i++)
|
||||
{ // 공 추가하기
|
||||
LobbyUI.Ins.m_Game_Lucky.Add_Ball(transform.localPosition);
|
||||
LobbyUI.Ins.m_Game_Lucky.Add_Ball(m_Money, transform.localPosition);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
@ -130,7 +131,7 @@ public class LuckyGameObj : MonoBehaviour
|
|||
void Set_Collision(int amount)
|
||||
{
|
||||
SoundInfo.Ins.Play_OneShot((eSound)Random.Range(16, 19));
|
||||
if (amount > 0) LobbyUI.Ins.m_Game_Lucky.Add_Amount(m_Money);
|
||||
LobbyUI.Ins.m_Game_Lucky.Add_Amount(m_Money, amount);
|
||||
m_image.enabled = false;
|
||||
m_Collider2D.enabled = false;
|
||||
go_effect.SetActive(true);
|
||||
|
|
|
|||
|
|
@ -149,10 +149,10 @@ public class GachaUI : uScrollViewMgr
|
|||
|
||||
public void OnClick_Lucky()
|
||||
{
|
||||
//if (SaveMgr.Ins.Check_Money(eMoney.Lucky, table_GlobalValue.Ins.Get_Int("LuckyPoint")))
|
||||
if (SaveMgr.Ins.Check_Money(eMoney.Lucky, table_GlobalValue.Ins.Get_Int("LuckyPoint")))
|
||||
{
|
||||
Init_GachaAnim();
|
||||
//SaveMgr.Ins.Add_Money(eMoney.Lucky, -table_GlobalValue.Ins.Get_Int("LuckyPoint"));
|
||||
SaveMgr.Ins.Add_Money(eMoney.Lucky, -table_GlobalValue.Ins.Get_Int("LuckyPoint"));
|
||||
SaveMgr.Ins.Save();
|
||||
LobbyUI.Ins.m_Game_Lucky.Set();
|
||||
Set_UI(false);
|
||||
|
|
|
|||
|
|
@ -50,7 +50,6 @@ public class ProfileCard : MonoBehaviour
|
|||
go_viewbtn.SetActive(count == 0);
|
||||
go_albumbtn.SetActive(count > 0);
|
||||
go_chatbtn.SetActive(count > 0);
|
||||
//go_chatbtn.SetActive(false); // 게등위 테스트
|
||||
go_changegirl.SetActive(false);
|
||||
if (SaveMgr.Ins.IsObtainGirl(2))
|
||||
{ // 획득한 캐릭터 2종 이상
|
||||
|
|
|
|||
Loading…
Reference in New Issue