private void Awake() { customerInstance = GetComponent <Customer>(); tattoomanager_Instance = GetComponent <TattooManager>(); ui_instance = GameObject.FindGameObjectWithTag("GameController").GetComponent <UImanager>(); scenes_manager = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <ScenesManager>(); }
void Start() { uiManager = GameObject.Find("Canvas").GetComponent <UImanager>(); leftGun.SetActive(false); aimPoint = Instantiate(aimPoint, Vector3.zero, transform.rotation); aimPoint.SetActive(false); }
// Start is called before the first frame update void Start() { uImanager = FindObjectOfType <UImanager>(); respawnui = FindObjectOfType <RespawnUI>(); playerPos = Player.transform.position; anim = GetComponent <Animator>(); }
void Awake() { if (instance == null) { instance = this; } }
void Awake() { if (instance == null) //if the instance is null we want to make this UI the instance. And there can be only one. ks. rivi 8 { instance = this; } }
// Start is called before the first frame update void Start() { _uiManager = GameObject.Find("Canvas").GetComponent <UImanager>(); audioSources = GetComponents <AudioSource>(); p = player.GetComponent <Player>(); p.lives = 1; }
public void PlayGame() { uImanager = FindObjectOfType <UImanager>(); Player.GetComponent <Hp>().hp = 100; uImanager.killingMeter[0].enabled = true; uImanager.killingMeter[1].enabled = true; uImanager.killingMeter[2].enabled = true; uImanager.imgDel = 2; Player.SetActive(true); foreach (GameObject x in Enemys) { x.SetActive(true); } foreach (GameObject x in Plants) { x.GetComponent <PoisonPlant>().pickedUp = false; x.GetComponent <PoisonPlant>().counter = 0; } checkpoint = FindObjectOfType <Checkpoint>(); Player.transform.position = checkpoint.playerPos; gameObject.SetActive(false); Text.SetActive(false); Player.GetComponent <Shoot>().fire = true; Player.GetComponent <Shoot>().poisonShots = poisonArrows; poisonArrowsText.text = poisonArrows + "x"; }
// Use this for initialization void Start() { downcheck = birdcheck = upcheck = once = true; num1 = num2 = num3 = 0; gun = Camera.main.GetComponent <changeFinger>().gun; uiManager = GameObject.Find("Canvas").GetComponent <UImanager>(); }
private void Awake() { currentTime = 3; electron.AssignGameObjects(); textUI = countdownText.GetComponent <TextMeshProUGUI>(); electronProperties = electron.electron.GetComponent <PlayerMovement>(); slider.value = slider.maxValue; uiScript = Pause.GetComponent <UImanager>(); proton = GameObject.FindGameObjectWithTag("Proton"); antiprotons = GameObject.FindGameObjectsWithTag("Antiproton"); superpositions = GameObject.FindGameObjectsWithTag("Superpositioner"); quantumEnergys = GameObject.FindGameObjectsWithTag("Bonus"); protonScript = proton.GetComponent <ProtonOrbit>(); for (int i = 0; i < superpositions.Length; i++) { superpositioners.Add(superpositions[i].GetComponent <Superpositioner>()); } for (int i = 0; i < quantumEnergys.Length; i++) { energyAdders.Add(quantumEnergys[i].GetComponent <EnergyAdder>()); } for (int i = 0; i < antiprotons.Length; i++) { antiprotonScripts.Add(antiprotons[i].GetComponent <AntiProton>()); } }
/// <summary> /// Instantiates and initializes elements needed for the program GUI. /// </summary> void InitGUI() { uiManager = GetComponent <UImanager>(); uiManager.SetPaths(baseFilesPath + "/" + experiment_name); // Needed if sub-folders are used (in uiManager, for instance) //CreateDirectoryIfNew(baseFilesPath + "/" + experiment_name); }
// this will check for when the player dies // Start is called before the first frame update void Start() { rb = GetComponent <Rigidbody2D>(); lola.GetComponent <Rigidbody2D>().gravityScale = 0;; UI = FindObjectOfType <UImanager>(); restart = FindObjectOfType <UImanager>(); }
// Start is called before the first frame update void Awake() { instance = this; isInventory = false; isShelf = false; isMarket = false; UIflag = true; }
private void Awake() { blockSpawner = FindObjectOfType <BlockSpawner>(); _launchPreview = GetComponent <LaunchPreview>(); _uImanager = GetComponent <UImanager>(); ballsReady = PlayerPrefs.BallsReady; CreateBall(); }
void Start() { bottompanel.SetActive(false); _isaddbutton = false; _instance = this; currentpanel = homepanel; DataMsg = Camera.main.GetComponent <DataMsg>(); }
void Awake() { uiManager = transform.GetComponent <UImanager>(); countdown = transform.GetComponent <Countdown>(); //Spawnmanager spawnManager = sm.GetComponent <SpawnManager>(); spawnManager2 = sm2.GetComponent <SpawnManager>(); }
// Start is called before the first frame update void Start() { shrinkAudio = GameObject.Find("shrinkingAudio").GetComponent <AudioSource>(); _anim = GetComponent <Animator>(); rb = GetComponent <Rigidbody2D>(); uiman = GameObject.Find("Canvas").GetComponent <UImanager>(); shakeCam = GameObject.Find("Main Camera").GetComponent <CameraShake>(); jumpSoundSource = GetComponent <AudioSource>(); }
// Start is called before the first frame update void Start() { _uimanager = GameObject.Find("Canvas").GetComponent <UImanager>(); spriteRenderer = GetComponent <SpriteRenderer>(); audioSource = GetComponent <AudioSource>(); bossLife = 250; bossAtack = true; StartCoroutine(BossShotSpawn()); }
void Awake() { // Setting up the references userControl = GetComponent <PlayerCharacter.UserControl>(); gameManager = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameManager>(); uiManager = GameObject.FindGameObjectWithTag("GameController").GetComponent <UImanager>(); //Get AudioManager audioManager = GameObject.Find("_AudioManager").GetComponent <AudioManager>(); }
///// public bool value1 = Input.GetKey("up"); // public bool value2 = Input.GetKey("down"); // Use this for initialization void Start() { _gamemanager = GameObject.Find("GameManager").GetComponent <GameManager>(); _uimanager = GameObject.Find("Canvas").GetComponent <UImanager>(); _uimanager.UpdateLives(life); _spawnmanager = GameObject.Find("Spawn_Manager").GetComponent <Spawn_Manager>(); _spawnmanager.startSpawn(); audio = GetComponent <AudioSource>(); }
// Use this for initialization void Start() { slider.maxValue = 5f; slider.value = 5f; StartCoroutine("Times"); instance = this; text.text = "Time :" + time + "s"; bloodtext.text = "100%"; tmoney.text = "金钱:" + fmoney + "$"; }
// Start is called before the first frame update void Start() { transform.position = new Vector3(0, -1.57f, 0); rb = GetComponent <Rigidbody2D>(); uiManager = GameObject.Find("Canvas").GetComponent <UImanager>(); gameControl = GameObject.Find("GameControl").GetComponent <GameControl>(); anim = GameObject.Find("leftButton").GetComponent <Animator>(); anim2 = GameObject.Find("rightButton").GetComponent <Animator>(); dogde = GetComponent <AudioSource>(); }
//referencia del canvas (uimanager) public void SetUIManager(UImanager uim) { theUIManager = uim; theUIManager.UpdateHearts(life); theUIManager.UpdateHerbs(herbs); theUIManager.UpdateSouls(haveTrex, haveAnkylo, activeAttack, haveTrice); }
//[SerializeField] //private bool _righteng = false; //[SerializeField] //private bool _lefteng = false; void Start() { transform.position = new Vector3(0, 0, 0); _spawnManager = GameObject.Find("SpawnManager").GetComponent <SpawnManager>(); uim = GameObject.Find("Canvas").GetComponent <UImanager>(); if (_spawnManager == null) { Debug.Log("No spwaning"); } }
// Use this for initialization void Awake() { uiManager = GameObject.Find("Evaluator").GetComponent <UImanager>(); inputField = transform.Find("ShowInputFieldButton").transform. Find("InputField").gameObject; label = transform.Find("ShowInputFieldButton").transform. Find("Label").GetComponent <Text>(); idLabel = transform.Find("IdLabel").GetComponent <Text>(); inputId = 0; }
void Start() { customerDone = false; currentCustomer = 0; // tempIndex = 0; isLeaving = false; isEntering = true; ui_manager = GameObject.FindGameObjectWithTag("GameController").GetComponent <UImanager>(); custData.initialise(); }
public void ObjectiveOpen(Objective obj) { if (!objectiveList.Contains(obj)) { objectiveList.Add(obj); } if (obj is DirtPot) { UImanager.SetPotUIActive(); } }
protected virtual void Awake() { if (_instance != null) { Debug.LogError("[Singleton] Tring t instantate a sceond instace of singleton class"); } else { _instance = this; } }
void Start() { if (!ui) { ui = GameObject.FindGameObjectWithTag("UIcanvas").GetComponent <UImanager>(); } if (!pb) { pb = GameObject.FindGameObjectWithTag("PlayerController").GetComponent <PlayerBehaviour>(); } }
private void Start() { Pause = GameObject.Find("UI Manager"); electron.AssignGameObjects(); if (electron.positrons.Length > 0) { positronTmpY = electron.positrons[currentPositron].transform.position.y; } electronRB = electron.electron.GetComponent <Rigidbody2D>(); uiScript = Pause.GetComponent <UImanager>(); col2D = GetComponent <Collider2D>(); }
// Start is called before the first frame update void Start() { _controller = GetComponent <CharacterController>(); _uImanager = GameObject.Find("Canvas").GetComponent <UImanager>(); if (_uImanager == null) { Debug.LogError("uimanager is definitely null"); } _uImanager.updateLivesDisplay(lives); }
// Update is called once per frame void Update () { if (player == null) { player = GameObject.FindGameObjectWithTag("Player").transform; playerUI = player.GetComponent<UImanager>(); } if(Vector3.Distance(transform.position, player.position) < 2 && Input.GetKeyDown(KeyCode.Z)) { Interact(); } if (Vector3.Distance(transform.position, player.position) > 3 && currentlyTalking == true) { currentlyTalking = false; playerUI.DisplayDialog("", 0); } }