Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- public class blink : MonoBehaviour {
- bool change = false;
- void Start () {
- renderer.material.color = Color.red;
- }
- void Update () {
- if (change || Input.GetButtonDown("blink"))
- {
- change = true;
- renderer.material.color = Color.Lerp(renderer.material.color, Color.black, Time.deltaTime)
- }
- }
- }
Add Comment
Please, Sign In to add comment