// Use this for initialization void Start() { //questionURL = HudScript.getCurrentQuestionURL(); image = HudScript.getCurrentImageSprite(); //setCurrentImage(questionURL); setCurrentImage(image); }
void OnTriggerEnter2D(Collider2D collision) { if (collision.tag == "Player") { HudScript.IncreaseScore(-500); Destroy(this.gameObject); } }
void OnTriggerEnter2D(Collider2D other) { if(other.tag == "Player"){ hud = GameObject.Find("Main Camera").GetComponent<HudScript>(); hud.IncreaseScore(5); Destroy(this.gameObject); } }
void OnTriggerEnter2D(Collider2D other) { if (other.tag == "Player") { hud = GameObject.Find("Main Camera").GetComponent <HudScript>(); hud.IncreaseScore(100); Destroy(this.gameObject); } }
private void OnTriggerEnter2D(Collider2D collision) { if (collision.tag == "Player") { hud = GameObject.Find("Canvas").GetComponent <HudScript>(); hud.IncScore(10); Destroy(this.gameObject); } }
// Start is called before the first frame update void Start() { hudManager = GameObject.Find("Gerenciador").GetComponent <HudScript>(); triggerDialogue = GameObject.Find("Gerenciador").GetComponent <DialogueTrigger>(); if (triggerDialogue.dialogue.name == "Tutorial") { triggerDialogue.TriggerDialogue(); } }
void OnTriggerEnter2D(Collider2D collision) { if (collision.tag == "Player") { HudScript.IncreaseScore(250); coinsCollected++; Destroy(this.gameObject); HudScript.getNextAnswer(); //setCurrentImage(HudScript.getCurrentImageSprite()); } }
void OnTriggerEnter2D(Collider2D other) { if (other.GetComponent <moosecontroller>() == null) { return; } HudScript.IncreaseScore(amount); powerUpSoundEffect.Play(); powerUpParticleEffect.Play(); Destroy(gameObject); }
// Start is called before the first frame update void Start() { GameObject hud_go = GameObject.FindGameObjectWithTag("GameController"); if (hud_go) { hud = hud_go.GetComponent <HudScript>(); //hud.WriteDeaths(); string[] die_list = hud.loadDeaths(); score1.text = die_list[0]; score2.text = die_list[1]; score3.text = die_list[2]; total.text = CalcTotal(die_list[0], die_list[1], die_list[2]).ToString(); } }
// Start is called before the first frame update void Start() { audio_source = GetComponent <AudioSource>(); movingPlatform = GameObject.FindGameObjectWithTag("Platform1").GetComponent <MovingPlatform>(); rb = GetComponent <Rigidbody2D>(); GameObject hud_go = GameObject.FindGameObjectWithTag("GameController"); if (hud_go) { hud = hud_go.GetComponent <HudScript>(); game_controller = hud.gameObject.GetComponent <GameController>(); } animator = GetComponent <Animator>(); alive = true; camera = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <Camera>(); sprite = GetComponent <SpriteRenderer>(); }
//The start method void Start() { //have the timer count equal to the timer start timerCount = timerStart; //set the reset timer timeRemaining = 1; //get the hud script in order to change the number of icons on the hud hud = this.transform.GetComponent <HudScript>(); //if the hud script was found set the current amount of lives if (hud != null) { hud.SetLives(lives); } menuObj = GameObject.Find("MenuLogic(Clone)"); if (menuObj != null) { menuScript = menuObj.GetComponent <MenuScript>(); } }
// Use this for initialization void Start () { hudScript = GameObject.Find("Main Camera").GetComponent<HudScript>(); }
void Start() { _maxShurikens = _shurikens; OwnedWeapons.Add (transform.GetComponentInChildren<WeaponScript> ()); CurrentWeapon = OwnedWeapons [0]; CurrentWeapon.Damage = 25; _playerMove = GetComponent<PlayerMovement>(); _playerMove.SetOwner(this); _playerMove.SetMovementSpeed(movementSpeed); saveCheckpoint(transform.position); Hud = GameObject.Find("Hud").GetComponent<HudScript>(); WorldGravity = GameObject.Find("World").GetComponent<GravityScript>(); }
void Awake () { player = GameObject.FindGameObjectWithTag ("Player"); hudScript = GameObject.Find ("Main Camera").GetComponent<HudScript> (); }
public float EPC = 2.0f; //Earnings Per Click private void Start() { hud = GameObject.Find("Gerenciador").GetComponent <HudScript>(); }
// Use this for initialization void Start () { HUD = FindObjectOfType<HudScript>(); }
void Start() { m_Incl = 0.0f; m_Rot_Y = 0.0f; m_JumpHandler = GetComponentInChildren<JumperScript>(); GameObject world = GameObject.Find("GameWorld"); m_WorldHandler = world.GetComponent<WorldControllerScript>(); Screen.showCursor = false; m_LocalGravityScript = gameObject.GetComponent<LocalGravityScript>(); m_AttachToPlayer = GameObject.Find("Grabber").GetComponent<AttachToPlayerScript>(); m_Camera = transform.FindChild("Camera").gameObject; Screen.lockCursor = true; m_goToLoad = new ArrayList(); m_PlayerCollider = gameObject.collider; m_PauseMenu = gameObject.GetComponent<PauseMenu>(); m_EndMenu = gameObject.GetComponent<EndMenu>(); m_Hud = GameObject.Find("HUD").GetComponent<HudScript>(); }
// Use this for initialization void Start() { if (!CurrentTextDisplayed) CurrentTextDisplayed = GameObject.Find("Text").GetComponent<Text>(); _hud = GameObject.Find("Hud").GetComponent<HudScript>(); }
// Use this for initialization void Start() { imgs = new List <Sprite>(); imgs = HudScript.getNonCurrentImageSprites(); setRandomNonCurrentImage(); }
// Start is called before the first frame update void Start() { pointsSystem = GameObject.Find("Gerenciador").GetComponent <PointsSystem>(); hudScript = GameObject.Find("Gerenciador").GetComponent <HudScript>(); }
void Start() { m_ScreenEffectMenu = GameObject.Find("MenuEffectGlobalScript").GetComponent<ScreenEffectScript>(); m_ScreenEffectMenu.Disable(); m_db_handler = gameObject.AddComponent<DataBaseHandling>(); this.enabled = false; m_Hud = GameObject.Find("HUD").GetComponent<HudScript>(); }
void Start() { m_Cs = GameObject.FindGameObjectWithTag("Player").GetComponent<ControllerScript>(); m_Hud = GameObject.Find("HUD").GetComponent<HudScript>(); }
void Start() { m_ScreenEffectMenu = GameObject.Find("MenuEffectGlobalScript").GetComponent<ScreenEffectScript>(); m_ScreenEffectMenu.Disable(); m_keybindings = new String[m_keybindings_labels.Length]; ratio_combobox = new GUIContent[3]; _4_3_combobox = new GUIContent[resolution_4_3.Length]; _16_10_combobox = new GUIContent[resolution_16_10.Length]; _16_9_combobox = new GUIContent[resolution_16_9.Length]; m_quality = new GUIContent[quality_string.Length]; menu = MainMenuSelected.NO_SELECTED; submenu = SubMenuSelected.NO_SELECTED; for (int i = 0; i < ratio_string.Length; i++) ratio_combobox[i] = new GUIContent(ratio_string[i]); for (int i = 0; i < resolution_4_3.Length; i++) _4_3_combobox[i] = new GUIContent(resolution_4_3[i]); for (int i = 0; i < resolution_16_10.Length; i++) _16_10_combobox[i] = new GUIContent(resolution_16_10[i]); for (int i = 0; i < resolution_16_9.Length; i++) _16_9_combobox[i] = new GUIContent(resolution_16_9[i]); for (int i = 0; i < quality_string.Length; i++) m_quality[i] = new GUIContent(quality_string[i]); skin.customStyles[0].hover.background = skin.customStyles[0].onHover.background = new Texture2D(2, 2); LoadKeysFromPrefs(); LoadFromPlayerPrefs("video"); m_db_handler = gameObject.AddComponent<DataBaseHandling>(); this.enabled = false; comboBoxControl.SetSelectedItemIndex(m_ratio); comboBoxQuality.SetSelectedItemIndex(quality); comboBoxResolution.SetSelectedItemIndex(m_resolution); m_Hud = GameObject.Find("HUD").GetComponent<HudScript>(); }