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

Ludum Dare 31 — Coming December 5th-8th 2014! — Join the Mailing List!
Also check out the Ludum Dare 30 results!
  • Ludum Dare 31 begins: in 73 days, 10 hours, 36 minutes, 33 seconds
  • (Time might be off, we’ll have it right soon) | Real World Gatherings (Now Open!)


    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]