public virtual void Init(GameObject player, Wave wave, EZ.Data.MonsterItem monsterItem) { m_UsingSkill = false; enabled = true; InDeath = false; m_Wave = wave; m_CurDeadTime = 0; m_CurEffectTime = m_EffectDtTime; if (m_AiBuffMgr != null) { m_AiBuffMgr.ClearBuff(); } InitOnceInfo(player, monsterItem); if (SkinePlayerAnim != null) { SkinePlayerAnim.enabled = true; } PlayAnim(GameConstVal.Run, -1, Random.Range(0.0f, 1.0f)); SetAnimSpeed(1); InitNormalInfo(player, monsterItem); SetCollisionEnable(true); SetRightBodyType(RigidbodyType2D.Dynamic); m_Hp = m_MaxHp; Debug.Log("m_Hp " + m_Hp); if (monsterItem.hasHpSlider > 0) { Global.gApp.gMsgDispatcher.Broadcast <int, Transform>(MsgIds.AddMonsterHpUi, m_Guid, m_HpNode); } if (monsterItem.hasShowAct > 0) { AIBossShow3001 show = gameObject.AddComponent <AIBossShow3001>(); show.Init(player); show.AddApperaEffect(); } if (m_AiPauseAct != null) { m_AiPauseAct.Init(this); } else { SetActEnable(true); } }
public override void Init(GameObject player, Wave wave, EZ.Data.MonsterItem monster) { base.Init(player, wave, monster); m_PursureAct.Init(player, wave, this); m_BeatBackAct.Init(player, wave, this); m_HitGroundAct.Init(player, wave, this); m_ThrowStoneAct.Init(player, wave, this); m_BeatBackAct.SetWeight(Weight); if (monster.hasShowAct > 0) { AIBossShow3001 show = gameObject.GetComponent <AIBossShow3001>(); show.SetShowCall(InstanceStoneBullet); } else { InstanceStoneBullet(); } }