private void AddChip() { if (!m_HasAddChip) { m_HasAddChip = true; m_Player.GetPlayerData().AddDropRes(m_ChipName.ToString(), m_DropCount); } }
private void OnTriggerEnter2D(Collider2D collision) { if (collision.gameObject.CompareTag(GameConstVal.DamageRangeTag)) { Player player = collision.gameObject.GetComponentInParent <Player>(); if (player == null) { player = collision.gameObject.GetComponentInChildren <Player>(); } if (player != null) { m_IsDeath = true; gameObject.GetComponent <CircleCollider2D>().enabled = false; player.ChangePet(m_PetName.ToString(), EffectTime, DamageCoefficient); Global.gApp.gMsgDispatcher.Broadcast <string, string, float>(MsgIds.AddFightUICountItem, "Pet", m_PetName.ToString(), EffectTime); m_Appear.SetActive(false); m_Disappear.SetActive(true); m_CurTime = 0; BroadGainProp(); } } }
protected override void Awake() { base.Awake(); AdapterName(m_WamponName.ToString()); }