public override void Init(GameObject playerGo, int guid) { base.Init(playerGo, guid); m_OriMass = m_Rigidbody2D.mass; m_AtkState = GetComponent <Robot001AtkState>(); m_FlashState = GetComponent <Robot001FlashState>(); m_LockState = GetComponent <Robot001LockState>(); m_PursueState = GetComponent <Robot001PursueState>(); m_FlashState.Init(playerGo, this); m_PursueState.Init(playerGo, this); m_LockState.Init(playerGo, this); m_AtkState.Init(playerGo, this); m_AtkState.SetLockState(m_LockState); transform.position = playerGo.transform.position; GameObject appearEffect = Global.gApp.gResMgr.InstantiateObj(EffectConfig.EffectPath[EffectConfig.Robot_Appear]); appearEffect.transform.position = playerGo.transform.position; ChangeToPursueState(); InitName(); }
public void SetLockState(Robot001LockState lockState) { m_LockState = lockState; }