Пример #1
0
        public void HitPlayerFX(LogicEntity e)
        {
            if (e.isDangerous)
            {
                if (e.collisionInfo.value.CollidesWithHorizontal(Tag.PLAYER))
                {
                    LogicEntity otherPlayer = Contexts.sharedInstance.logic.GetEntityWithId(e.collisionInfo.value.GetHorizontalEntity(Tag.PLAYER));

                    GlobalVFX.PlayDangerousHatHitPlayerParticles(

                        otherPlayer.position.value.ToVector3(),
                        e.direction.value,
                        e.collider.value.halfExtents.ToVector3(),
                        otherPlayer.velocity.value.ToVector2()


                        );
                }

                if (e.collisionInfo.value.CollidesWithVertical(Tag.PLAYER))
                {
                    LogicEntity otherPlayer = Contexts.sharedInstance.logic.GetEntityWithId(e.collisionInfo.value.GetVerticalEntity(Tag.PLAYER));

                    GlobalVFX.PlayDangerousHatHitPlayerParticles(

                        otherPlayer.position.value.ToVector3(),
                        e.direction.value,
                        e.collider.value.halfExtents.ToVector3(),
                        otherPlayer.velocity.value.ToVector2()


                        );
                }
            }
        }
Пример #2
0
        public void HitHatFX(LogicEntity e)
        {
            if (e.isDangerous)
            {
                if (e.collisionInfo.value.CollidesWithHorizontal(Tag.HAT))
                {
                    LogicEntity otherHat = Contexts.sharedInstance.logic.GetEntityWithId(e.collisionInfo.value.GetHorizontalEntity(Tag.HAT));

                    if (otherHat.isAttached)
                    {
                        LogicEntity otherPlayer = Contexts.sharedInstance.logic.GetEntityWithId(otherHat.followPoint.targetID);

                        GlobalVFX.PlayDangerousHatHitPlayerParticles(

                            otherPlayer.position.value.ToVector3(),
                            e.direction.value,
                            e.collider.value.halfExtents.ToVector3(),
                            otherPlayer.velocity.value.ToVector2()

                            );
                    }
                    else
                    {
                    }
                }

                if (e.collisionInfo.value.CollidesWithVertical(Tag.HAT))
                {
                    LogicEntity otherHat = Contexts.sharedInstance.logic.GetEntityWithId(e.collisionInfo.value.GetVerticalEntity(Tag.HAT));

                    if (otherHat.isAttached)
                    {
                        LogicEntity otherPlayer = Contexts.sharedInstance.logic.GetEntityWithId(otherHat.followPoint.targetID);

                        GlobalVFX.PlayDangerousHatHitPlayerParticles(

                            otherPlayer.position.value.ToVector3(),
                            e.direction.value,
                            e.collider.value.halfExtents.ToVector3(),
                            otherPlayer.velocity.value.ToVector2()

                            );
                    }
                    else
                    {
                    }
                }
            }
            else
            {
            }
        }