Unity Ninja Unity 3D Forum
To have exclusive access to all downloads, recourses and links within this forum, a free registered account is required. Just a heads up Wink

You are not connected. Please login or register

Unity Ninja Unity 3D Forum » FREE Project Downloads & Recources » Scripts » Simple light flicker

Simple light flicker

View previous topic View next topic Go down  Message [Page 1 of 1]

1 Simple light flicker on Mon Nov 03, 2014 11:03 am

developer23


Moderator
Moderator
Hi guys Very Happy I made this very simple script of light flicker Very Happy I hope it's useful for someone

Script (Js):
Code:
#pragma strict

var interval : float = 1.0f;
function Start ()
{
 ¬†InvokeRepeating("Toggle", interval, interval);
}

function Update ()
{
light.intensity = Random.Range (0.3f, 5f);
}
function Toggle()
{
 ¬† ¬†gameObject.active = !gameObject.active;
}
Image:



Last edited by developer23 on Tue Jan 27, 2015 12:49 pm; edited 2 times in total

View user profile http://masterdevelopers.altervista.org/

2 Re: Simple light flicker on Mon Nov 03, 2014 11:06 am

NewDeveloper


Moderator
Moderator
Hey developer23, thanks for the share. I'm sure it is going to be useful to someone.

--New Developer

View user profile

3 Re: Simple light flicker on Mon Nov 03, 2014 11:24 am

developer23


Moderator
Moderator
NewDeveloper wrote:Hey developer23, thanks for the share. I'm sure it is going to be useful to someone.

--New Developer
Thank you Very Happy I also added in description the image Very Happy

View user profile http://masterdevelopers.altervista.org/

View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum