About | Rules and Guide | Sign In/Create Account | Write a Post
Construction1990’s Internet Montage? No!
Please excuse the site weirdness. Mike is fixing and making things.
Ludum Dare 31 — Coming December 5th-8th 2014!

  • ??? Begins: in 8 days, 1 hour, 35 minutes, 9 seconds
  • October Ends: in 9 days, 1 hour, 47 minutes, 9 seconds
  • Ludum Dare 31 begins: in 44 days, 2 hours, 35 minutes, 9 seconds
  • (FYI: Clock might be off) | Ludum Dare 31: Real World Gatherings (Now Open!)

    [ October Challenge 2014 | Resources | Submit/Edit | View All ]


    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]