Exemplo n.º 1
0
 //Events
 // Use this for initialization
 void Start()
 {
     ropeCollected = false;
     drawing       = false;
     ropelessHole  = GameObject.Find("EmptyDungeonHole");
     ropeHole      = GameObject.Find("DungeonHole");
     player        = GameObject.Find("Player");
     pause         = GameObject.Find("PauseMenu").GetComponent <PauseScript>();
     soundFX       = GameObject.Find("Main Camera").GetComponent <FxHandler>();
 }
 // Use this for initialization
 void Start()
 {
     walking    = false;
     arrowTimer = 0f;
     weapon     = GameObject.FindGameObjectWithTag("Weapon");
     pauseMenu  = GameObject.Find("PauseMenu");
     soundFX    = GameObject.Find("Main Camera").GetComponent <FxHandler>();
     deathMenu  = GameObject.Find("DeathMenu");
     deathMenu.SetActive(false);
 }
Exemplo n.º 3
0
    // Use this for initialization
    void Start()
    {
        soundFX = GameObject.Find("Main Camera").GetComponent <FxHandler>();
        player  = GameObject.FindGameObjectWithTag("Player");

        Vector3 mousePos = Camera.main.ScreenToWorldPoint(Input.mousePosition);

        direction = mousePos - player.transform.position;
        direction = Vector2.ClampMagnitude(direction, 1f);

        float angleFromUp = Vector2.Angle(Vector2.up, direction);

        if (direction.x < 0)
        {
            angleFromUp *= -1;
        }
        transform.rotation = Quaternion.AngleAxis(angleFromUp, -Vector3.forward);
    }
Exemplo n.º 4
0
 //Events
 void Start()
 {
     inventory = GameObject.FindGameObjectWithTag("Player").GetComponent <InventoryManager>();
     soundFX   = GameObject.Find("Main Camera").GetComponent <FxHandler>();
 }
Exemplo n.º 5
0
 // Use this for initialization
 void Start()
 {
     maxHealth = health;
     soundFX   = GameObject.Find("Main Camera").GetComponent <FxHandler>();
 }
Exemplo n.º 6
0
 // Use this for initialization
 void Start()
 {
     player = GameObject.FindGameObjectWithTag("Player");
     soundFX = GameObject.Find("Main Camera").GetComponent<FxHandler>();
 }