Ejemplo n.º 1
0
 private void WhenObjBecameInvisible(bool isRightNow = false)
 {
     ActorVisibleManager.Instance.SetShow(this.uuid, false, this.IsIgnorePeopleShowMaximumType());
     if (!this.m_isInit)
     {
         this.m_isInit       = true;
         this.m_isPeopleShow = false;
     }
     else
     {
         if (!this.m_isPeopleShow)
         {
             return;
         }
         this.m_isPeopleShow = false;
     }
     this.ShowHeadInfo(false);
     this.ShowWeaponFX(false);
     if (isRightNow)
     {
         ShaderEffectUtils.SetFadeRightNow(this.alphaControls, true);
         this.ShowAnims(false);
         this.ShowSMRs(false);
     }
     else
     {
         ShaderEffectUtils.SetFade(this.alphaControls, true, delegate
         {
             this.ShowAnims(false);
             this.ShowSMRs(false);
         });
     }
 }
Ejemplo n.º 2
0
    private void SphereCastAll()
    {
        for (int i = 0; i < this.ids.get_Count(); i++)
        {
            EntityParent entityByID = EntityWorld.Instance.GetEntityByID(this.ids.get_Item(i));
            if (entityByID != null)
            {
                ShaderEffectUtils.SetFadeRightNow(entityByID.alphaControls, false);
            }
        }
        Ray   ray = new Ray(base.get_transform().get_position(), base.get_transform().get_forward());
        float num = Vector3.Distance(this.GetRolePositionWithHeight(), base.get_transform().get_position());

        RaycastHit[] array = Physics.SphereCastAll(ray, 0.5f, num);
        string       text  = string.Empty;

        RaycastHit[] array2 = array;
        for (int j = 0; j < array2.Length; j++)
        {
            RaycastHit  raycastHit = array2[j];
            ActorParent component  = raycastHit.get_collider().get_gameObject().GetComponent <ActorParent>();
            if (!(component == null))
            {
                if (component is ActorMonster || component is ActorCityPlayer)
                {
                    text = text + raycastHit.get_collider().get_gameObject().get_name() + ", ";
                    ShaderEffectUtils.SetFadeRightNow(component.GetEntity().alphaControls, true);
                    this.ids.Add(component.GetEntity().ID);
                }
            }
        }
    }
Ejemplo n.º 3
0
    protected void SetPlayerActor(ActorPlayer actorPlayer, Action logicCallback)
    {
        AvatarModel avatarModel = DataReader <AvatarModel> .Get(this.FixModelID);

        base.Actor            = actorPlayer;
        actorPlayer.theEntity = this;
        base.Actor.FixGameObject.set_name(base.ID.ToString());
        base.Actor.FixGameObject.SetActive(true);
        base.Actor.InitActionPriorityTable();
        base.Actor.CanAnimatorApplyMotion = false;
        base.Actor.DataLayerState         = ((avatarModel.collideOff <= 0) ? 0 : 1);
        base.Actor.DefaultModelHeight     = avatarModel.defaultModelHeight;
        base.Actor.ModelHeight            = avatarModel.defaultModelHeight;
        base.Actor.IsLockModelDir         = (avatarModel.lockDirection == 1);
        base.Actor.RotateSpeed            = avatarModel.RotateSpeed;
        base.Actor.RotateInterval         = (float)avatarModel.rotateInterval;
        base.Actor.StartRotateAngle       = (float)avatarModel.startAngle;
        base.Actor.FinishRotateAngle      = (float)avatarModel.finishAngle;
        base.Actor.FloatRate = avatarModel.floatProba;
        ShadowController.ShowShadow(base.ID, base.Actor, false, this.FixModelID);
        ShaderEffectUtils.InitShaderRenderers(base.Actor.FixTransform, this.shaderRenderers, ref this.shadowRenderer, ref this.shadowSlicePlane);
        ShaderEffectUtils.InitHitEffects(this.shaderRenderers, this.hitControls);
        ShaderEffectUtils.InitTransparencys(this.shaderRenderers, this.alphaControls);
        ShaderEffectUtils.SetFadeRightNow(this.alphaControls, false);
        ShaderEffectUtils.SetOutlineStatus(base.Actor.FixTransform, LuminousOutline.Status.Normal);
        if (avatarModel.curve == 1)
        {
            ShaderEffectUtils.SetMeshRenderToLayerFXDistortion(base.Actor.FixTransform);
        }
        this.InitBillboard((float)avatarModel.height_HP, avatarModel.bloodBar);
        WaveBloodManager.Instance.AddWaveBloodControl(base.Actor.FixTransform, (float)avatarModel.height_Damage, base.ID);
        if (this.IsInBattle)
        {
            if (this.IsDead)
            {
                CommandCenter.ExecuteCommand(base.Actor.FixTransform, new PlayActionCmd
                {
                    actName    = "die",
                    jumpToPlay = true,
                    percent    = 1f
                });
            }
            else
            {
                base.Actor.CastAction("born", true, 1f, 0, 0, string.Empty);
            }
        }
        else
        {
            base.Actor.CastAction("idle", true, 1f, 0, 0, string.Empty);
        }
        if (logicCallback != null)
        {
            logicCallback.Invoke();
        }
        this.InitActorState();
    }
Ejemplo n.º 4
0
    public override void CreateActor()
    {
        ActorPet petActor = EntityWorld.Instance.GetPetActor(this.FixModelID);
        Pet      pet      = DataReader <Pet> .Get(this.TypeID);

        AvatarModel avatarModel = DataReader <AvatarModel> .Get(this.FixModelID);

        base.Actor         = petActor;
        petActor.theEntity = this;
        base.Actor.FixGameObject.set_name(base.ID.ToString());
        base.Actor.FixGameObject.SetActive(true);
        base.Actor.InitActionPriorityTable();
        base.Actor.CanAnimatorApplyMotion = false;
        base.Actor.DataLayerState         = ((avatarModel.collideOff <= 0) ? 0 : 1);
        base.Actor.DefaultModelHeight     = avatarModel.defaultModelHeight;
        base.Actor.ModelHeight            = avatarModel.defaultModelHeight;
        base.Actor.IsLockModelDir         = (avatarModel.lockDirection == 1);
        base.Actor.RotateSpeed            = avatarModel.RotateSpeed;
        base.Actor.RotateInterval         = (float)avatarModel.rotateInterval;
        base.Actor.StartRotateAngle       = (float)avatarModel.startAngle;
        base.Actor.FinishRotateAngle      = (float)avatarModel.finishAngle;
        base.Actor.FloatRate = avatarModel.floatProba;
        ShadowController.ShowShadow(base.ID, base.Actor, false, this.FixModelID);
        ShaderEffectUtils.SetHSV(base.Actor.FixTransform, pet.colour);
        ShaderEffectUtils.InitShaderRenderers(base.Actor.FixTransform, this.shaderRenderers, ref this.shadowRenderer, ref this.shadowSlicePlane);
        ShaderEffectUtils.InitHitEffects(this.shaderRenderers, this.hitControls);
        ShaderEffectUtils.InitTransparencys(this.shaderRenderers, this.alphaControls);
        ShaderEffectUtils.SetFadeRightNow(this.alphaControls, false);
        ShaderEffectUtils.SetOutlineStatus(base.Actor.FixTransform, LuminousOutline.Status.Normal);
        if (avatarModel.curve == 1)
        {
            ShaderEffectUtils.SetMeshRenderToLayerFXDistortion(base.Actor.FixTransform);
        }
        this.InitBillboard((float)avatarModel.height_HP, avatarModel.bloodBar);
        WaveBloodManager.Instance.AddWaveBloodControl(base.Actor.FixTransform, (float)avatarModel.height_Damage, base.ID);
        this.InitActorState();
    }
Ejemplo n.º 5
0
 public void RemoveAVC()
 {
     ShaderEffectUtils.SetFadeRightNow(this.alphaControls, false);
     this.ShowAnims(true);
     this.ShowSMRs(true);
 }