Inheritance: MonoBehaviour
Ejemplo n.º 1
0
 // Use this for initialization
 void Start()
 {
     //questionURL = HudScript.getCurrentQuestionURL();
     image = HudScript.getCurrentImageSprite();
     //setCurrentImage(questionURL);
     setCurrentImage(image);
 }
Ejemplo n.º 2
0
 void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.tag == "Player")
     {
         HudScript.IncreaseScore(-500);
         Destroy(this.gameObject);
     }
 }
Ejemplo n.º 3
0
 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);
     }
 }
Ejemplo n.º 5
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.tag == "Player")
     {
         hud = GameObject.Find("Canvas").GetComponent <HudScript>();
         hud.IncScore(10);
         Destroy(this.gameObject);
     }
 }
Ejemplo n.º 6
0
    // 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();
        }
    }
Ejemplo n.º 7
0
 void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.tag == "Player")
     {
         HudScript.IncreaseScore(250);
         coinsCollected++;
         Destroy(this.gameObject);
         HudScript.getNextAnswer();
         //setCurrentImage(HudScript.getCurrentImageSprite());
     }
 }
Ejemplo n.º 8
0
    void OnTriggerEnter2D(Collider2D other)
    {
        if (other.GetComponent <moosecontroller>() == null)
        {
            return;
        }

        HudScript.IncreaseScore(amount);
        powerUpSoundEffect.Play();
        powerUpParticleEffect.Play();
        Destroy(gameObject);
    }
Ejemplo n.º 9
0
    // 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();
        }
    }
Ejemplo n.º 10
0
    // 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>();
    }
Ejemplo n.º 11
0
    //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>();
        }
    }
Ejemplo n.º 12
0
	// Use this for initialization
	void Start () 
	{
		hudScript = GameObject.Find("Main Camera").GetComponent<HudScript>();


	}
Ejemplo n.º 13
0
 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>();
 }
Ejemplo n.º 14
0
	void Awake () 
	{
		player = GameObject.FindGameObjectWithTag ("Player");
		hudScript = GameObject.Find ("Main Camera").GetComponent<HudScript> ();
	}
Ejemplo n.º 15
0
    public float EPC = 2.0f; //Earnings Per Click



    private void Start()
    {
        hud = GameObject.Find("Gerenciador").GetComponent <HudScript>();
    }
Ejemplo n.º 16
0
	// Use this for initialization
	void Start () {
		HUD = FindObjectOfType<HudScript>();
	}
Ejemplo n.º 17
0
 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>();
 }
Ejemplo n.º 18
0
 // Use this for initialization
 void Start()
 {
     if (!CurrentTextDisplayed)
         CurrentTextDisplayed = GameObject.Find("Text").GetComponent<Text>();
     _hud = GameObject.Find("Hud").GetComponent<HudScript>();
 }
Ejemplo n.º 19
0
 // 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>();
 }
Ejemplo n.º 21
0
    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>();
    }
Ejemplo n.º 22
0
 void Start()
 {
     m_Cs = GameObject.FindGameObjectWithTag("Player").GetComponent<ControllerScript>();
     m_Hud = GameObject.Find("HUD").GetComponent<HudScript>();
 }
Ejemplo n.º 23
0
    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>();
    }