Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public bool invincible;
- public Material solid;
- public Material faded;
- public float duration;
- // Use this for initialization
- void Start ()
- {
- renderer.material = solid;
- }
- // Update is called once per frame
- void Update ()
- {
- Debug.Log(counter);
- invincible = false;
- if(Input.GetKey(KeyCode.X))
- {
- invincible = true;
- renderer.material = faded;
- }
- else
- {
- gameObject.renderer.material = solid;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement