Example #1
0
        public void HitLevelFX(LogicEntity e)
        {
            if (e.isAttached)
            {
                return;
            }

            if (e.collisionInfo.value.CollidesWith(Tag.DEFAULT))
            {
                if (e.collisionInfo.value.CollidesHorizontal())
                {
                    GlobalVFX.PlayHatHitWallHorizontal(

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

                        );
                }
                else if (e.collisionInfo.value.up == Tag.DEFAULT)
                {
                    GlobalVFX.PlayHatHitWallVertical(

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

                        );
                }
            }
        }
Example #2
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()


                        );
                }
            }
        }
        private void FallEndFX(LogicEntity e)
        {
            if (e.isFastFalling)
            {
                GlobalVFX.PlayLandFastFallDust(

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

                    );
            }
            else
            {
                GlobalVFX.PlayLandDust(

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

                    );
            }
        }
Example #4
0
    //[Space(5)]

    void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }
    }
        private void RunRepeatFX(LogicEntity e)
        {
            GlobalVFX.PlayRunParticles(

                e.position.value.ToVector3(),
                e.direction.value,
                e.collider.value.halfExtents.ToVector3()

                );
        }
Example #6
0
        public void ThrowFX(LogicEntity e)
        {
            GlobalVFX.PlayThrowFXParticles(

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

                );
        }
        private void DashBeginFX(LogicEntity e)
        {
            GlobalVFX.PlayDashParticles(

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

                );
        }
Example #8
0
        public void FrictionFX(LogicEntity e)
        {
            GlobalVFX.PlayHatGroundFrictionParticles(

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

                );
        }
        private void JumpBeginFX(LogicEntity e)
        {
            GlobalVFX.PlayJumpParticles(

                e.position.value.ToVector3(),
                e.direction.value,
                e.collider.value.halfExtents.ToVector3(),
                e.velocity.value.ToVector3(),
                e.jumpsCompleted.value.ToInt()

                );
        }
        private void WallRideRepeatFX(LogicEntity e)
        {
            //if (playerInfo.velocity.y <= 0)
            GlobalVFX.PlayWallSlideDust(

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

                );
        }
Example #11
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
            {
            }
        }
Example #12
0
        public void PickUpFX(LogicEntity e)
        {
            LogicEntity owner = Contexts.sharedInstance.logic.GetEntityWithId(e.followPoint.targetID);

            GlobalVFX.PlayPickUpParticles(

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

                );
        }
Example #13
0
        public void DangerOverFX(LogicEntity e)
        {
            if (e.isAttached)
            {
                return;
            }

            GlobalVFX.PlayDangerFinishParticles(

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

                );
        }
 private void StunRepeatFX(LogicEntity e)
 {
     GlobalVFX.PlayStunnedParticles(e.position.value.ToVector3());
 }