Exemplo n.º 1
0
        public override BaseEvent Clone()
        {
            SetCollisionTick tick = ClassObjPool <SetCollisionTick> .Get();

            tick.CopyData(this);
            return(tick);
        }
Exemplo n.º 2
0
        public override void Process(Action _action, Track _track)
        {
            this.actor = _action.GetActorHandle(this.targetId);
            if (!this.actor)
            {
                if (ActionManager.Instance.isPrintLog)
                {
                }
                return;
            }
            ActorRoot                 handle         = this.actor.get_handle();
            SkillUseContext           refParamObject = _action.refParams.GetRefParamObject <SkillUseContext>("SkillContext");
            PoolObjHandle <ActorRoot> originator     = refParamObject.Originator;
            int num = 0;

            if (originator && refParamObject != null)
            {
                SkillComponent skillControl = originator.get_handle().SkillControl;
                SkillSlot      skillSlot;
                if (skillControl.TryGetSkillSlot(refParamObject.SlotType, out skillSlot) && skillSlot != null)
                {
                    num = skillSlot.GetSkillLevel() - 1;
                }
            }
            if (num < 0)
            {
                num = 0;
            }
            if (this.type == SetCollisionTick.ColliderType.Box)
            {
                VCollisionBox collisionShape = SetCollisionTick.GetCollisionShape <VCollisionBox>(handle, CollisionShapeType.Box);
                collisionShape.Pos   = this.Pos;
                collisionShape.Size  = new VInt3(this.Size.x + this.SizeGrowthValue.x * num, this.Size.y + this.SizeGrowthValue.y * num, this.Size.z + this.SizeGrowthValue.z * num);
                collisionShape.dirty = true;
                collisionShape.ConditionalUpdateShape();
            }
            else if (this.type == SetCollisionTick.ColliderType.Sphere)
            {
                VCollisionSphere collisionShape2 = SetCollisionTick.GetCollisionShape <VCollisionSphere>(handle, CollisionShapeType.Sphere);
                collisionShape2.Pos    = this.Pos;
                collisionShape2.Radius = this.Radius + this.RadiusGrowthValue * num;
                collisionShape2.dirty  = true;
                collisionShape2.ConditionalUpdateShape();
            }
            else if (this.type == SetCollisionTick.ColliderType.CylinderSector)
            {
                VCollisionCylinderSector collisionShape3 = SetCollisionTick.GetCollisionShape <VCollisionCylinderSector>(handle, CollisionShapeType.CylinderSector);
                collisionShape3.Pos      = this.Pos;
                collisionShape3.Radius   = this.SectorRadius;
                collisionShape3.Height   = this.Height;
                collisionShape3.Degree   = this.Degree;
                collisionShape3.Rotation = this.Rotation;
                collisionShape3.dirty    = true;
                collisionShape3.ConditionalUpdateShape();
            }
        }
Exemplo n.º 3
0
        protected override void CopyData(BaseEvent src)
        {
            base.CopyData(src);
            SetCollisionTick tick = src as SetCollisionTick;

            this.targetId = tick.targetId;
            this.type     = tick.type;
            this.Pos      = tick.Pos;
            this.Size     = tick.Size;
            this.Radius   = tick.Radius;
        }
Exemplo n.º 4
0
        protected override void CopyData(BaseEvent src)
        {
            base.CopyData(src);
            SetCollisionTick setCollisionTick = src as SetCollisionTick;

            this.targetId          = setCollisionTick.targetId;
            this.type              = setCollisionTick.type;
            this.Pos               = setCollisionTick.Pos;
            this.Size              = setCollisionTick.Size;
            this.Radius            = setCollisionTick.Radius;
            this.SectorRadius      = setCollisionTick.SectorRadius;
            this.Degree            = setCollisionTick.Degree;
            this.Rotation          = setCollisionTick.Rotation;
            this.Height            = setCollisionTick.Height;
            this.SizeGrowthValue   = setCollisionTick.SizeGrowthValue;
            this.RadiusGrowthValue = setCollisionTick.RadiusGrowthValue;
        }
        public override void Process(Action _action, Track _track)
        {
            this.actor = _action.GetActorHandle(this.targetId);
            if (!this.actor)
            {
                if (ActionManager.Instance.isPrintLog)
                {
                }
                return;
            }
            ActorRoot       handle         = this.actor.handle;
            SkillUseContext refParamObject = _action.refParams.GetRefParamObject <SkillUseContext>("SkillContext");
            int             num            = 1;

            if (refParamObject != null && refParamObject.Originator)
            {
                SkillSlot skillSlot;
                refParamObject.Originator.handle.SkillControl.TryGetSkillSlot(refParamObject.SlotType, out skillSlot);
                if (skillSlot != null)
                {
                    num = skillSlot.GetSkillLevel();
                }
                BaseSkill refParamObject2 = _action.refParams.GetRefParamObject <BaseSkill>("SkillObj");
                if (refParamObject2 != null)
                {
                    BuffSkill buffSkill = refParamObject2.isBuff ? ((BuffSkill)refParamObject2) : null;
                    if (buffSkill != null)
                    {
                        byte b = buffSkill.cfgData.bGrowthType;
                        b %= 10;
                        if (b > 0 && (SkillSlotType)b != refParamObject.SlotType + 1)
                        {
                            SSkillFuncContext sSkillFuncContext = default(SSkillFuncContext);
                            sSkillFuncContext.inOriginator = refParamObject.Originator;
                            sSkillFuncContext.inBuffSkill  = new PoolObjHandle <BuffSkill>(buffSkill);
                            sSkillFuncContext.inTargetObj  = refParamObject.TargetActor;
                            sSkillFuncContext.inUseContext = refParamObject;
                            num = sSkillFuncContext.iSkillLevel;
                        }
                    }
                }
            }
            if (this.type == SetCollisionTick.ColliderType.Box)
            {
                VCollisionBox collisionShape = SetCollisionTick.GetCollisionShape <VCollisionBox>(handle, CollisionShapeType.Box);
                collisionShape.Pos   = this.Pos;
                collisionShape.Size  = this.Size + this.SizeGrowthValue * (num - 1);
                collisionShape.dirty = true;
                collisionShape.ConditionalUpdateShape();
            }
            else if (this.type == SetCollisionTick.ColliderType.Sphere)
            {
                VCollisionSphere collisionShape2 = SetCollisionTick.GetCollisionShape <VCollisionSphere>(handle, CollisionShapeType.Sphere);
                collisionShape2.Pos    = this.Pos;
                collisionShape2.Radius = this.Radius + this.RadiusGrowthValue * (num - 1);
                collisionShape2.dirty  = true;
                collisionShape2.ConditionalUpdateShape();
            }
            else if (this.type == SetCollisionTick.ColliderType.CylinderSector)
            {
                VCollisionCylinderSector collisionShape3 = SetCollisionTick.GetCollisionShape <VCollisionCylinderSector>(handle, CollisionShapeType.CylinderSector);
                collisionShape3.Pos      = this.Pos;
                collisionShape3.Radius   = this.SectorRadius + this.SectorRadiusGrow * (num - 1);
                collisionShape3.Height   = this.Height + this.HeightGrow * (num - 1);
                collisionShape3.Degree   = this.Degree + this.DegreeGrow * (num - 1);
                collisionShape3.Rotation = this.Rotation + this.RotationGrow * (num - 1);
                collisionShape3.dirty    = true;
                collisionShape3.ConditionalUpdateShape();
            }
        }