Home | Rules and Guide | Sign In/Create Account | Write a Post | Reddit | #LD48 | #ludumdare on irc.afternet.org (Info)

Ludum Dare 30 — August 22nd-25th 2014 — Theme: Connected Worlds
  • Judging Ends: in 14 days, 11 hours, 8 minutes, 5 seconds
  • [ Real World Gatherings | Ludum Deals | Warmup Weekend (Games) | MiniLD #53 | Wallpaper (1) (2) (3) | Mailing List ]

    [ Play+Rate | Edit | View All Games | My Game ]


    Posts Tagged ‘health’

    Some scripts I made to make things easier

    Posted by (twitter: @Zazanxors)
    Friday, August 22nd, 2014 8:26 pm

    Straight to the point, these are some scripts I wrote in C# for Unity 2D stuff that I’ll be using – feel free to use them any way you want.

    TileTextureManager.cs

    This script is ment to make creating platformer scenes a bit easier. Assign it to the tile you are using and then give it six sprites for said tile – it will detect nearby tiles and automatically select the appropriate sprite to use, then rotate as needed so that you can place tiles and leave it to the rest.

    PlayerMovement.cs

    Pretty self-explanatory, this is a simple script to act as a sort of 2D CharacterController for the player. Comes with a debugging option. Requires a trigger collider to detect whether or not the player is on the ground.

    EnemyAI.cs

    Also rather self-explanatory. Simple script that doubles as very basic A.I. and physics handler for enemies. Physics is nigh-identical to player physics. Also includes debugging option and also needs a trigger collider.

    HealthLogic.cs

    Decent health script I wrote for whatever needs it. EnemyLogic will need this to deal damage properly to the player properly. Includes logic for invulnerability periods after getting hit. Debugging on this will only display health in the console.


    All posts, images, and comments are owned by their creators.

    [cache: storing page]