Created
August 29, 2018 08:40
-
-
Save SatoshiRobatoFujimoto/d2d8b6f04807737bfc1ec3abae8123e9 to your computer and use it in GitHub Desktop.
ガチラボ vol.9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class ColorManager : MonoBehaviour { | |
public GameObject cube; | |
public void SetColorRed() | |
{ | |
cube.GetComponent<Renderer>().material.color = Color.red; | |
} | |
public void SetColorGreen() | |
{ | |
cube.GetComponent<Renderer>().material.color = Color.green; | |
} | |
public void SetColorBlue() | |
{ | |
cube.GetComponent<Renderer>().material.color = Color.blue; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment