Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Need help with Scripting for 2D Game.

Discussion in 'Scripting' started by JosephLim, Jan 23, 2017.

  1. JosephLim

    JosephLim

    Joined:
    Jan 23, 2017
    Posts:
    4
    Hi guys,

    before I start asking for help, this is what ive been working on, a 2D platformer game similar to metal slug, but there is something I want the game to have which is to be able to change the colour of everything in the game from black and white to colour. My game is in black and white, but when he picks up this item "Ecstasy" the whole game world goes into colour for a limited time period, lets say 1 minute, then it goes back to black and white. Could I get some help with this script, would really appreciate it if someone would teach me how to do it. thank you
     
  2. KrakenKoders

    KrakenKoders

    Joined:
    Jun 11, 2014
    Posts:
    6
    If you're using something like the camera filter packs, https://www.assetstore.unity3d.com/en/#!/content/18433 , then you could just activate and deactivate the canvas overlay on the screen. If not you could create your own screen filter that just makes the game go b&w and leave it active during the majority of game play. Then when the character gets the Ecstasy you could have it run a script to disable the filter for a delayed amount of time.

    If you are going about it a different way would change how I would personally implement it. For me I would go the camera filter route because it's quick and easy. Works the same as turning a panel on and off when creating your GUI. You also get a crap ton of filters that you can use in all your games, or like I said you could create your own.
     
    JosephLim likes this.
  3. JosephLim

    JosephLim

    Joined:
    Jan 23, 2017
    Posts:
    4

    Sorry but could you give me like a sample script on creating a screen filter?
     
  4. piggybank1974

    piggybank1974

    Joined:
    Dec 15, 2015
    Posts:
    621