private void Awake()
 {
     customerInstance       = GetComponent <Customer>();
     tattoomanager_Instance = GetComponent <TattooManager>();
     ui_instance            = GameObject.FindGameObjectWithTag("GameController").GetComponent <UImanager>();
     scenes_manager         = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <ScenesManager>();
 }
Esempio n. 2
0
 void Start()
 {
     uiManager = GameObject.Find("Canvas").GetComponent <UImanager>();
     leftGun.SetActive(false);
     aimPoint = Instantiate(aimPoint, Vector3.zero, transform.rotation);
     aimPoint.SetActive(false);
 }
Esempio n. 3
0
 // Start is called before the first frame update
 void Start()
 {
     uImanager = FindObjectOfType <UImanager>();
     respawnui = FindObjectOfType <RespawnUI>();
     playerPos = Player.transform.position;
     anim      = GetComponent <Animator>();
 }
Esempio n. 4
0
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
Esempio n. 5
0
 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;
     }
 }
Esempio n. 6
0
 // 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;
 }
Esempio n. 7
0
    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";
    }
Esempio n. 8
0
 // 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>();
 }
Esempio n. 9
0
 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>());
     }
 }
Esempio n. 10
0
 /// <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);
 }
Esempio n. 11
0
    // 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>();
    }
Esempio n. 12
0
 // Start is called before the first frame update
 void Awake()
 {
     instance    = this;
     isInventory = false;
     isShelf     = false;
     isMarket    = false;
     UIflag      = true;
 }
Esempio n. 13
0
 private void Awake()
 {
     blockSpawner   = FindObjectOfType <BlockSpawner>();
     _launchPreview = GetComponent <LaunchPreview>();
     _uImanager     = GetComponent <UImanager>();
     ballsReady     = PlayerPrefs.BallsReady;
     CreateBall();
 }
Esempio n. 14
0
 void Start()
 {
     bottompanel.SetActive(false);
     _isaddbutton = false;
     _instance    = this;
     currentpanel = homepanel;
     DataMsg      = Camera.main.GetComponent <DataMsg>();
 }
Esempio n. 15
0
    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>();
 }
Esempio n. 17
0
 // 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());
 }
Esempio n. 18
0
 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>();
 }
Esempio n. 19
0
    ///// 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>();
    }
Esempio n. 20
0
 // 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 + "$";
 }
Esempio n. 21
0
 // 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>();
 }
Esempio n. 22
0
    //referencia del canvas (uimanager)
    public void SetUIManager(UImanager uim)
    {
        theUIManager = uim;

        theUIManager.UpdateHearts(life);

        theUIManager.UpdateHerbs(herbs);

        theUIManager.UpdateSouls(haveTrex, haveAnkylo, activeAttack, haveTrice);
    }
Esempio n. 23
0
 //[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");
     }
 }
Esempio n. 24
0
 // 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;
 }
Esempio n. 25
0
 void Start()
 {
     customerDone    = false;
     currentCustomer = 0;
     //  tempIndex = 0;
     isLeaving  = false;
     isEntering = true;
     ui_manager = GameObject.FindGameObjectWithTag("GameController").GetComponent <UImanager>();
     custData.initialise();
 }
Esempio n. 26
0
 public void ObjectiveOpen(Objective obj)
 {
     if (!objectiveList.Contains(obj))
     {
         objectiveList.Add(obj);
     }
     if (obj is DirtPot)
     {
         UImanager.SetPotUIActive();
     }
 }
Esempio n. 27
0
 protected virtual void Awake()
 {
     if (_instance != null)
     {
         Debug.LogError("[Singleton] Tring t instantate a sceond instace of singleton class");
     }
     else
     {
         _instance = this;
     }
 }
Esempio n. 28
0
 void Start()
 {
     if (!ui)
     {
         ui = GameObject.FindGameObjectWithTag("UIcanvas").GetComponent <UImanager>();
     }
     if (!pb)
     {
         pb = GameObject.FindGameObjectWithTag("PlayerController").GetComponent <PlayerBehaviour>();
     }
 }
Esempio n. 29
0
 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);
    }
Esempio n. 31
0
	// 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);
        }
	}