// Use this for initialization void Start() { scoreControllerRef = GameObject.Find ("scoreP").GetComponent<scoreController> (); speed = Random.Range (6f, 10f); time =Random.Range(0.2f,0.5f); player = GameObject.FindGameObjectWithTag("Player"); }
// Use this for initialization void Start () { theSpawnDoor = GameObject.Find ("winningConditions").GetComponent <spawnDoor> (); Time.timeScale = 1; thePlayerScore = GameObject.Find("_GM").GetComponent<scoreController> (); thePlayerHealth = GameObject.Find("Player").GetComponent <playerHealth> (); }
public void resumeOrTryAction() { uiSound(); GameObject gameControllerObject = GameObject.FindWithTag("GameController"); scoreController score = gameControllerObject.GetComponent <scoreController>(); if (score != null) { if (score.getScore() == 0) { showSelectLevel(); return; } if (score.getHealth() > 0) { resumeGame(); } else { adTryAgain = true; showAd(); } } }
public void loadLevel(int level) { hideMenu(); Cursor.visible = false; Time.timeScale = 1; GameObject gameControllerObject = GameObject.FindWithTag("GameController"); if (gameControllerObject != null) { scoreController score = gameControllerObject.GetComponent <scoreController>(); if (score != null) { score.updateLevelText(level); score.resetStars(); score.resetScore(); score.resetHealth(); } } SceneManager.LoadScene(0); GameObject gameEngine = GameObject.Find("GameEngine"); gameEngine engine = gameEngine.GetComponent <gameEngine>(); engine.startLevel(level, false); }
// Use this for initialization void Start() { sc = GameObject.Find("_GM").GetComponent <scoreController> (); //Debug.Log ("win stage = "+sc.winStage1); /*PlayerPrefs.DeleteKey ("winStage1"); * sc.winStage1 = 0;*/ }
// Use this for initialization void Start() { GameObject gameControllerObject = GameObject.FindWithTag("GameController"); if (gameControllerObject != null) { score = gameControllerObject.GetComponent <scoreController>(); } if (score == null) { Debug.Log("Cannot find 'GameController' script"); } }
public void tryAgain() { GameObject gameControllerObject = GameObject.FindWithTag("GameController"); if (gameControllerObject != null) { scoreController score = gameControllerObject.GetComponent <scoreController>(); if (score != null) { loadLevel(score.getLevel()); } } }
// Use this for initialization void Start() { myRigidbody = GetComponent <Rigidbody2D>(); myCollider = GetComponent <BoxCollider2D>(); myCircleCollider = GetComponent <CircleCollider2D>(); myAnimator = GetComponent <Animator>(); obstacleCtrl = GameObject.FindObjectOfType <obstacleController>(); theScoreController = FindObjectOfType <scoreController>(); }
// Use this for initialization void Start() { GameObject gameControllerObject = GameObject.FindWithTag("GameController"); if (gameControllerObject != null) { score = gameControllerObject.GetComponent <scoreController>(); } if (score == null) { Debug.Log("Cannot find 'GameController' script"); } randomPositionXStar = Random.Range(-2500, -2600); }
public void makeDead() { Instantiate(deathFX, transform.position, transform.rotation); Destroy(gameObject); AudioSource.PlayClipAtPoint(playerDeathSound, transform.position); damageScreen.color = damagedColour; pauseBtn.SetActive(false); scoreController thePlayerScore = GameObject.Find("_GM").GetComponent <scoreController> (); txtScoreDeath.text = thePlayerScore.Score.ToString(); Animator gameOverAnimator = playerDeathUI.GetComponent <Animator> (); gameOverAnimator.SetTrigger("gameOver"); //theGameManager.restartTheGame (); }
// Use this for initialization void Start() { GameObject gameControllerObject = GameObject.FindWithTag("GameController"); if (gameControllerObject != null) { score = gameControllerObject.GetComponent <scoreController>(); } if (score == null) { Debug.Log("Cannot find 'GameController' script"); } StartCoroutine("AutoBulletProcess"); player = GameObject.FindGameObjectWithTag("Player"); }
// Use this for initialization void Start() { //GetComponent<Rigidbody2D>().velocity = movement; GameObject gameControllerObject = GameObject.FindWithTag ("GameController"); if (gameControllerObject != null) { score = gameControllerObject.GetComponent <scoreController>(); } if (score == null) { Debug.Log ("Cannot find 'GameController' script"); } GameObject player = GameObject.FindGameObjectWithTag ("Player"); playerLocation = player.transform.position; //GetComponent<Rigidbody2D>().AddForce ((player.transform.position - transform.position).normalized * Time.smoothDeltaTime * 350); }
// Use this for initialization void Start() { GameObject gameControllerObject = GameObject.FindWithTag("GameController"); if (gameControllerObject != null) { score = gameControllerObject.GetComponent <scoreController>(); } if (score == null) { Debug.Log("Cannot find 'GameController' script"); } float randomPositionXStar = Random.Range(-2500, -2600); float randomPositionYStar = this.gameObject.transform.position.y; destination = new Vector2(randomPositionXStar, randomPositionYStar); }
// Use this for initialization void Start() { //InvokeRepeating ("launchBullet", 1f, 1f); GameObject gameControllerObject = GameObject.FindWithTag("GameController"); if (gameControllerObject != null) { score = gameControllerObject.GetComponent <scoreController>(); } if (score == null) { Debug.Log("Cannot find 'GameController' script"); } randomPositionYStar = Random.Range(-300, 300); randomPositionXStar = Random.Range(-500, 1200); }
// Use this for initialization void Start() { GameObject gameControllerObject = GameObject.FindWithTag("GameController"); if (gameControllerObject != null) { score = gameControllerObject.GetComponent <scoreController>(); } if (score == null) { Debug.Log("Cannot find 'GameController' script"); } GameObject menuControls = GameObject.Find("menuControls"); menu = menuControls.GetComponent <startOver>(); menu.startScreen(); }
void Start() { GameObject puppyShip = GameObject.Find("puppyShip"); GameObject craftShip = GameObject.Find("craftShip"); puppyShip.SetActive(false); craftShip.SetActive(true); starCenter = GameObject.FindWithTag("starCenter"); Cursor.visible = false; //Screen.lockCursor = true; GameObject gameControllerObject = GameObject.FindWithTag("GameController"); if (gameControllerObject != null) { score = gameControllerObject.GetComponent <scoreController>(); } if (score == null) { Debug.Log("Cannot find 'GameController' script"); } GameObject menu = GameObject.FindGameObjectWithTag("menu"); menuCanvas = menu.GetComponent <Canvas>(); menuCanvas.enabled = false; foreach (Transform child in transform) { Debug.Log(child.gameObject.name); if (child.gameObject.name.Equals("bombDropLocation")) { bombDropLocation = child.gameObject.transform; } } StartCoroutine(AutoBulletProcess()); StartCoroutine(AutoSpecialBulletProcess()); oneFourth = Screen.width / 4; oneHalf = Screen.width / 2; }
// Use this for initialization void Start() { GameObject gameControllerObject = GameObject.FindWithTag("GameController"); if (gameControllerObject != null) { score = gameControllerObject.GetComponent <scoreController>(); } if (score == null) { Debug.Log("Cannot find 'GameController' script"); } randomPositionYStar = Random.Range(-1600, 2000); randomPositionXStar = Random.Range(-2500, -2600); GameObject bossGameObject = GameObject.FindWithTag("bossBubble"); if (bossGameObject != null) { this.transform.parent = bossGameObject.transform; } player = GameObject.FindGameObjectWithTag("Player"); }
public void resumeOrTryText() { GameObject gameControllerObject = GameObject.FindWithTag("GameController"); scoreController score = gameControllerObject.GetComponent <scoreController>(); GameObject resumeTextGameObject = GameObject.FindWithTag("resumeOrTryAgain"); Text textObj = resumeTextGameObject.GetComponent <Text>(); if (score != null) { if (score.getHealth() > 0) { textObj.text = "RESUME"; } else { textObj.text = "TRY AGAIN"; } if (score.getScore() == 0) { textObj.text = "NEW GAME"; } } }
//public static string inGameName; void start() { theScoreController = FindObjectOfType <scoreController>(); }
// Use this for initialization void Start() { GameObject scoreControllerObject = GameObject.FindGameObjectWithTag("score"); Initalize (); scoreController = scoreControllerObject.GetComponent<scoreController>(); //startPos = gameObject.transform.position; }
void addScore() { scoreController thePlayerScore = GameObject.Find("_GM").GetComponent <scoreController> (); thePlayerScore.addScore(enemyScore); }
// Use this for initialization void Start() { score = GetComponent<Text>(); GameObject scoreControllerObject = GameObject.FindGameObjectWithTag("score"); scoreController = scoreControllerObject.GetComponent<scoreController>(); }
void Start() { txt = GetComponent<TextMesh> (); scriptRef = GameObject.Find ("scoreP").GetComponent<scoreController> (); }
// Use this for initialization void Start() { score = GameObject.FindGameObjectWithTag ("score").GetComponent<scoreController>(); contadores = Camera.main.GetComponent<Contadores> (); waves = GameObject.Find ("SpawnBoss").GetComponent<spawnBoss> (); DamageReducion = false; maxHitPoints = hitPoints; anim = GameObject.FindGameObjectWithTag("Face").GetComponent<Animator>(); damageSFX.volume = PlayerPrefs.GetFloat("SFXVolume"); }
void start() { theScoreController = FindObjectOfType <scoreController>(); theScoreController.scoreInc = true; }