private void OnHerorelive(KProtoBuf buffer) { S2C_HERO_RELIVE respond = buffer as S2C_HERO_RELIVE; Debug.Log("OnHerorelive" + "heroID:" + respond.heroID); m_EntityManager.SendEventToEntity(respond.heroID, ComponentEventName.Relive, null); }
private void SyncHeroRelive(KProtoBuf buf) { S2C_HERO_RELIVE respond = buf as S2C_HERO_RELIVE; SceneEntity hero = GetSceneObject(respond.heroID) as SceneEntity; hero.property.isDeaded = hero.property.isDeadTemp = false; hero.DispatchEvent(ControllerCommand.FinishImmediate); hero.DispatchEvent(ControllerCommand.Idle, false); if (hero.property.isMainHero) { hero.DispatchEvent(ControllerCommand.HERO_MOVE); } }