// Start is called before the first frame update protected virtual void Start() { enemySpawner = GameObject.Find("enemySpawner"); sc = FindObjectOfType <sceneController>(); enemySpawner.GetComponent <enemySpawner>().add1EnemyCount(); getdirection(); }
void Awake() { boxCollider = GetComponent <BoxCollider2D>(); sprite = GetComponent <SpriteRenderer>(); sceneController = GameObject.FindWithTag("GameController").GetComponent <sceneController>(); active(sceneController.currentColor == sceneController.SceneColor.red && isRed || sceneController.currentColor == sceneController.SceneColor.blue && !isRed); }
void Start() { startPos = transform.position; gameC = FindObjectOfType(typeof(GameController)) as GameController; sceneC = FindObjectOfType(typeof(sceneController)) as sceneController; ScreenController = FindObjectOfType(typeof(screenController)) as screenController; }
void Awake() { animator = GetComponent <Animator>(); edgeCollider = GetComponent <EdgeCollider2D>(); sceneController = GameObject.FindWithTag("GameController").GetComponent <sceneController>(); active(sceneController.currentColor == sceneController.SceneColor.red && isRed || sceneController.currentColor == sceneController.SceneColor.blue && !isRed); }
void Start() { gameC = FindObjectOfType(typeof(GameController)) as GameController; playerC = FindObjectOfType(typeof(playerController)) as playerController; achievementsC = FindObjectOfType(typeof(AchievementsAnalysisController)) as AchievementsAnalysisController; sceneC = FindObjectOfType(typeof(sceneController)) as sceneController; }
// Start is called before the first frame update void Start() { scene = sceneGO.GetComponent <sceneController>(); EdgeCollider2D edgeCollider; edgeCollider = GetComponent <EdgeCollider2D>(); possibleXYvalues = new Vector2(Mathf.Abs(edgeCollider.points[0].x), Mathf.Abs(edgeCollider.points[0].y)); }
// Use this for initialization void Start() { controller = GameObject.Find("ScriptsController").GetComponent<sceneController>(); if(!name.Equals("door")) { renderer.enabled = false; } }
public IEnumerator StartArcade() { Animator title = GameObject.Find("Canvas/Menus/GameTitle").GetComponent <Animator>(); sceneController sc = GameObject.Find("SceneManager").GetComponent <sceneController>(); title.Play("Break", 0, 0); yield return(new WaitForSecondsRealtime(.5f)); //SceneManager.LoadScene("ArcadeMode"); StartCoroutine(sc.PrepareAndLoadNextScene(true)); }
// Use this for initialization void Start() { rigidBody = GetComponent <Rigidbody2D> (); animator = GetComponent <Animator> (); jumpController = GetComponent <Jump> (); rend = GetComponent <Renderer>(); sceneController = GameObject.FindWithTag("GameController").GetComponent <sceneController>(); blueChar = rend.material.shader; redChar = Shader.Find("Sprites/Default"); emitRipple = GetComponent <EmitRipple>(); facingRight = true; }
public IEnumerator MyCor() //Can this be renamed to describe what it does? - CC { Animator title = GameObject.Find("Canvas/Menus/GameTitle").GetComponent <Animator>(); title.Play("Crumble", 0, 0); yield return(new WaitForSecondsRealtime(2.5f)); sceneController sc = GameObject.Find("SceneManager").GetComponent <sceneController>(); StartCoroutine(sc.PrepareAndLoadNextScene(false)); //.PrepareFirstLevelAsynch(); //sc.TryLoadPreparedScene(); }
void Awake() { // creates a singleton manager that persists between scenes if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } DontDestroyOnLoad(gameObject); }
// Use this for initialization void Start() { controller = GameObject.Find("ScriptsController").GetComponent<sceneController>(); if(ActualState == state.Open) { OpenDoor(false); } else { CloseDoor(false); } playSound = true; }
void Start() { sceneCtrl = this; start = SceneManager.GetSceneByName("game_start"); scene_2 = SceneManager.GetSceneByName("scene_2"); river = SceneManager.GetSceneByName("river"); scene_3fr = SceneManager.GetSceneByName("scene_3_fr"); scene_3mt = SceneManager.GetSceneByName("scene_3_mt"); caves = SceneManager.GetSceneByName("caves"); monster = SceneManager.GetSceneByName("monster"); end = SceneManager.GetSceneByName("end"); end2 = SceneManager.GetSceneByName("end2"); }
void Start() { isAni = true; gameC = FindObjectOfType(typeof(GameController)) as GameController; sceneC = FindObjectOfType(typeof(sceneController)) as sceneController; for (int i = 0; i < maxQtdMoney; i++) { GameObject tempM = Instantiate(moneyPrefab) as GameObject; moneys.Add(tempM); tempM.SetActive(false); } UseShip = PlayerPrefs.GetInt("ptc_UseShip"); clearShipAndUse(); }
void Start() { gameC = FindObjectOfType(typeof(GameController)) as GameController; sceneC = FindObjectOfType(typeof(sceneController)) as sceneController; timeToTryToSpawnArm = timeToTryToSpawn; nRaven = 0; currentTime = 0; for (int i = 0; i < maxSpawnBirds; i++) { GameObject tempB = Instantiate(birdPrefab) as GameObject; birds.Add(tempB); tempB.SetActive(false); } for (int i = 0; i < maxSpawnNyans; i++) { GameObject tempN = Instantiate(nyanPrefab) as GameObject; nyans.Add(tempN); tempN.SetActive(false); } }
// Use this for initialization void Start() { controller = GameObject.Find("ScriptsController").GetComponent<sceneController>(); transform.position.Set(initX, initY, initZ); actualState = state.droped; dot = GameObject.Find("dot").transform; actualPosition = new Vector3(dot.position.x, dot.position.y, cachedZ); if(GameObject.Find ("GameController").GetComponent<gameControllerScripts>().miniGameResolved) { SetPlaced(); } }
// Use this for initialization void Start() { controller = GameObject.Find("ScriptsController").GetComponent<sceneController>(); if (rigidbody) rigidbody.freezeRotation = true; }
void Start() { levelInt = 0; sceneC = FindObjectOfType(typeof(sceneController)) as sceneController; isOn = false; }
// Use this for initialization void Start() { instance = this; }