Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Dir = {
- [Direction.UP] = Vector(0,-1),
- [Direction.DOWN] = Vector(0,1),
- [Direction.LEFT] = Vector(-1,0),
- [Direction.RIGHT] = Vector(1,0)
- }
- function ArunesMod:OnUpdate(player)
- local MoveDir = player:GetMovementDirection()
- for _, entities in pairs(Isaac.GetRoomEntities()) do
- if entities.Type == EntityType.ENTITY_EFFECT
- and entities.Variant == EffectVariant.YOUR_COSTUME_EFFECT then
- local costumeEffect = entities
- local sprite = costumeEffect:GetSprite()
- -- check the fire direction to set the offset
- if MoveDir == Direction.DOWN then
- if not (sprite;IsPlaying(“WalkDown“ then
- sprite:Play(“WalkDown“, true)
- end
- elseif MoveDir == Direction.RIGHT then
- if not (sprite;IsPlaying(“WalkRight“ then
- sprite:Play(“WalkRight“, true)
- end
- elseif MoveDir == Direction.UP then
- if not (sprite;IsPlaying(“WalkUp“ then
- sprite:Play(“WalkUp“, true)
- end
- elseif MoveDir == Direction.LEFT then
- if not (sprite;IsPlaying(“WalkLeft“ then
- sprite:Play(“WalkLeft“, true)
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment