private void Start() { var player = GameObject.Find("Player"); pDamage = player.GetComponent <PlayerDamage>(); pControls = player.GetComponent <Player_Move_Prot>(); smoke = PlayerSmokeParticle.GetComponent <ParticleSystem>(); }
// Use this for initialization void Start() { audioSource_Pain = GetComponents <AudioSource>()[2]; inventory = GetComponent <Inventory>(); rbody = GetComponent <Rigidbody2D>(); playerMove = GetComponent <Player_Move_Prot>(); spriteRenderer = GetComponent <SpriteRenderer>(); }
// Use this for initialization void Start() { user = FindObjectOfType <Player_Move_Prot> (); if (user.transform.localScale.x < 0) { speed = -speed; } flipSprite(); }
// Use this for initialization private void Awake() { player = GameObject.FindGameObjectWithTag("Player"); player.transform.position = gameObject.transform.position; rigidBody2D = player.GetComponent <Rigidbody2D>(); rigidBody2D.bodyType = RigidbodyType2D.Dynamic; movement = player.GetComponent <Player_Move_Prot>(); movement.GroundCheck = GroundCheck; movement.groundLayer = groundLayer; }
private void Start() { TotalPickupsInWorld = GameObject.FindGameObjectsWithTag("Pickup").Length; PlayerScript = GetComponent <Player_Move_Prot>(); MaxHealthBarWidth = HealthBar.GetComponent <RectTransform>().sizeDelta.x; MaxEnergyBarWidth = EnergyBar.GetComponent <RectTransform>().sizeDelta.x; if (StartWithAllEquip) { Equipment.Add(EquipmentEnum.BlinkDrive); Equipment.Add(EquipmentEnum.CloudTread); Equipment.Add(EquipmentEnum.PhaseWalk); } }
void Start() { player = GetComponent <Player_Move_Prot>(); }