Esempio n. 1
0
        public static bool Destroy(PeEntity entity)
        {
            if (entity == null)
            {
                Debug.LogError("entity is null");
                return(false);
            }

            Object.Destroy(entity.GetGameObject());
            return(true);
        }
Esempio n. 2
0
    protected override void OnPEInstantiate(uLink.NetworkMessageInfo info)
    {
        _id        = info.networkView.initialData.Read <int>();
        _externId  = info.networkView.initialData.Read <int>();
        authId     = info.networkView.initialData.Read <int>();
        _tdId      = info.networkView.initialData.Read <int>();
        _dungeonId = info.networkView.initialData.Read <int>();
        _colorType = info.networkView.initialData.Read <int>();
        _playerId  = info.networkView.initialData.Read <int>();
        _buffId    = info.networkView.initialData.Read <int>();

        _aiList.Clear();

        EntityGrp.CreateMonsterGroup(ExternId & ~Pathea.EntityProto.IdGrpMask, transform.position, _colorType, _playerId, Id, _buffId);

        Pathea.PeEntity entity = Pathea.EntityMgr.Instance.Get(Id);
        if (null == entity)
        {
            return;
        }

        OnSpawned(entity.GetGameObject());
    }