void Awake() { controllerManager = SteamVR_ControllerManager.instance; _cachedRenderer = GetComponent <Renderer>(); hypPlayer = HyperCreature.instance; }
void Start() { player = HyperCreature.instance; wanderLoc = new Vector3(Random.Range(-6, 7), 3, Random.Range(-6, 7)); kamiManager = KamiManager.instance; StartCoroutine(ColorTrans()); }
// Use this for initialization void Start() { isScrolling = false; playerClosed = false; startFade = false; setScroll(isActive); player = HyperCreature.instance; updateVisuals(); }
void Awake() { foreach (string prefabPath in prefabPaths) { Resources.Load(prefabPath); } player = HyperCreature.instance; player.w_perif = initialWPerif; }
// Use this for initialization void Start() { kamiManager = KamiManager.instance; player = HyperCreature.instance; particleObj = GameObject.Find("BonsaiShrine/Particles").GetComponent <ParticleSystem>(); shears = GameObject.Find("Shears").transform; var em = particleObj.emission; em.rate = 0; }
// Use this for initialization void Start() { player = HyperCreature.instance; myHyper = GetComponent <HyperObject>(); rake = GameObject.Find("Rake"); tine1 = GameObject.FindGameObjectWithTag("Tine 1"); tine2 = GameObject.FindGameObjectWithTag("Tine 2"); tine3 = GameObject.FindGameObjectWithTag("Tine 3"); tine4 = GameObject.FindGameObjectWithTag("Tine 4"); gravel = GameObject.FindGameObjectWithTag("Gravel"); gravelShrine = Object.FindObjectOfType <GravelShrine>(); GetComponent <Renderer>().material.mainTexture = texture; drawingSizeX = Mathf.Ceil(drawingSizeX * rake.GetComponent <Transform>().localScale.x / gravel.GetComponent <Transform>().localScale.x); drawingSizeZ = Mathf.Ceil(drawingSizeZ * rake.GetComponent <Transform>().localScale.z / gravel.GetComponent <Transform>().localScale.z); raked = 0; originalColor.r = 0.0f; originalColor.g = 0.0f; originalColor.b = 0.0f; originalColor.a = 0.0f; coordinates = new int[1024, 1024]; originalThird = (int)Mathf.Ceil((float)texture.width / 10.0f); tine1Collision = false; tine2Collision = false; tine3Collision = false; tine4Collision = false; isRakedEnough = false; lastTine1Node = null; lastTine2Node = null; lastTine3Node = null; lastTine4Node = null; lineNumber = 1; drawPeriod = 900.0f; frame = 1; texture.Apply(); }
void Awake() { fadeImage = GameObject.Find("Canvas/Image").GetComponent <UnityEngine.UI.Image>(); fadeImage.material.color = Color.black; //declare as singleton if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } //add this later for persistant creature DontDestroyOnLoad(gameObject); }
void Awake() { player = HyperCreature.instance; patternStartNode = transform.GetChild(0).gameObject; patternEndNode = transform.GetChild(1).gameObject; rake = GameObject.Find("Rake"); GetComponent <LineRenderer>().SetPosition(0, transform.GetChild(0).transform.position); GetComponent <LineRenderer>().SetPosition(1, transform.GetChild(1).transform.position); GetComponent <LineRenderer>().SetWidth(0.01f, 0.01f); switch (patternDimension) { case 0: lineColor = new Color(1.0f, 0.0f, 0.0f); break; case 1: lineColor = new Color(1.0f, 1.0f, 0.0f); break; case 2: lineColor = new Color(0.0f, 1.0f, 0.0f); break; case 3: lineColor = new Color(0.0f, 1.0f, 1.0f); break; case 4: lineColor = new Color(1.0f, 0.0f, 1.0f); break; default: lineColor = Color.red; break; } GetComponent <LineRenderer>().SetColors(lineColor, lineColor); GetComponent <LineRenderer>().SetColors(Color.clear, Color.clear); }
void Start() { myIndex = (int)gameObject.GetComponent <SteamVR_TrackedObject>().index; player = HyperCreature.instance; }
void Awake() { isEnding = false; gameDuration = (gameMinutes * 60.0f) + gameSeconds; player = HyperCreature.instance; }
void Awake() { isEffected = false; hyperC = Object.FindObjectOfType <HyperCreature>(); }