Esempio n. 1
0
            public static IGameEntity GetGameEntityByCharacterId(string characterId)
            {
                if (playerEntity.GetCharacterId() == characterId)
                {
                    return(playerEntity);
                }

                if (characterToEntityId.ContainsKey(characterId))
                {
                    string entityId = characterToEntityId[characterId];
                    return(GetGameEntityById(entityId));
                }
                else
                {
                    if (NpcManager.instance != null)
                    {
                        return(NpcManager.instance.GetEntityByCharacterId(characterId));
                    }
                    else
                    {
                        return(null);
                    }
                }
            }