// Update is called once per frame void Update() { if (noPlayer) { player = FindObjectOfType <playerControler>(); } if (player != null && noPlayer) { noPlayer = false; initVie(); } if (!noPlayer) { if (player.vie == 0) { noPlayer = true; } if (v != player.vie) { damageAffichageUpdate(v - player.vie); } NbPA.text = "" + player.curPM; Cost[0].text = "" + 1; if (player.CurWeapon != null) { Cost [1].text = "" + player.CurWeapon.cost; Cost [2].text = "" + player.CurSpell.cost; } } }
// Start is called before the first frame update void Start() { //Dans le gameObject player, va chercher le script playerControler playerControlerScript = GameObject.Find("Player").GetComponent <playerControler>(); //On va chercher la source audio du gameOject cimetiere cimetiereAudio = GetComponent <AudioSource>(); }
// Start is called before the first frame update void Start() { _controleBola = FindObjectOfType(typeof(ControleBola)) as ControleBola; _playerControle = FindObjectOfType(typeof(playerControler)) as playerControler; StartCoroutine("SpawnMina"); StartCoroutine("SpawnEscada"); }
// Start is called before the first frame update void Start() { //Dans le gameObject player, va chercher le script playerControler playerControlerScript = GameObject.Find("Player").GetComponent <playerControler>(); //On va chercher la source audio u sous-marin sousMarinAudio = GetComponent <AudioSource>(); }
// Start is called before the first frame update void Start() { //Dans le gameObject player, va chercher le script playerControler playerControlerScript = GameObject.Find("Player").GetComponent <playerControler>(); //Va chercher l'audio source whaleAudio = GetComponent <AudioSource>(); }
public void OnTriggerEnter2D(Collider2D o) { if (o.tag == "Player") { playerControler temp = o.GetComponent <playerControler>(); temp.damageTaking(Dmg); } }
public static void setTransform(playerControler pc, GameObject cell, int pm) { if (pc != null) { pc.transform.position = new Vector3(cell.transform.position.x, cell.transform.position.y, 0); //newTrans.position pc.Rbody.velocity = Vector2.zero; pc.curPM -= pm; } }
void OnTriggerEnter2D(Collider2D other) { if (other.tag.Equals("dopeFish")) { //Debug.Log("HELLO"); playerControler tmp = transform.parent.gameObject.GetComponent <playerControler>(); tmp.Die(); } }
// Start is called before the first frame update void Start() { float sideArea = 4 * (playAreaSize.x - minSpawnDistances.x) * minSpawnDistances.y; float capArea = 4 * playAreaSize.x * (playAreaSize.y - minSpawnDistances.y); leftRightCuttoff = sideArea / (sideArea + capArea); screenBounds = cam.ScreenToWorldPoint(new Vector3(Screen.width, Screen.height, 0)); rightBound = screenBounds.x + 6f; upperBound = screenBounds.y + 6f; PC = player.GetComponent <playerControler>(); }
void OnCollisionEnter2D(Collision2D other) { if (other.gameObject.tag == "player") { playerControler controller = other.gameObject.GetComponent <playerControler> (); if (attemptToUnblock(controller.toggleValue)) { controller.resetToggleValue(); } } }
// Start is called before the first frame update void Start() { Time.timeScale = 1; puntoAparicion = gameObject.transform.position; tda = 0; g = new Vector3(0, -9.81f, 0); mulSalto = 1f; rb = GetComponent <Rigidbody>(); //buscar el manager Manag = GameObject.Find("gameManager").GetComponent <playerControler>(); }
// Update is called once per frame void Update() { if (pop_player.playerCount > 0) { player = FindObjectOfType <playerControler>(); //print (player); } if (FindObjectsOfType <OtherPlayerControler> ().Length >= 2) { otherplayer1 = FindObjectsOfType <OtherPlayerControler> ()[0]; otherplayer2 = FindObjectsOfType <OtherPlayerControler> ()[1]; } reachGlobalUpdate(CellsTab); }
void Start() { if (PlayerControler == null) { PlayerControler = this; DontDestroyOnLoad(gameObject); } else { Destroy(gameObject); } m_Rigidbody2D = gameObject.GetComponent <Rigidbody2D>(); m_Animator = gameObject.GetComponent <Animator>(); m_SpriteRenderer = gameObject.GetComponent <SpriteRenderer>(); }
// Start is called before the first frame update void Start() { player = playerObject.GetComponent <playerControler>(); playerTopSpeed = player.GetTopSpeed(); }
// Use this for initialization void Start() { player = gameObject.GetComponentInParent <playerControler>(); rb = gameObject.GetComponentInParent <Rigidbody2D>(); }
// Use this for initialization void Start() { player = GetComponentInParent <playerControler>(); gameObject.transform.SetParent(null); }
// Use this for initialization void Start() { player = gameObject.GetComponentInParent <playerControler>(); }
void Start() { player = GetComponentInParent <playerControler>(); rb2d = GetComponentInParent <Rigidbody2D>(); }