// Use this for initialization void Start() { _transform = GetComponent(typeof(Transform)) as Transform; _rigidbody = GetComponent(typeof(Rigidbody2D)) as Rigidbody2D; playerHealthHandler = GetComponent <PlayerHealthHandler>(); playerWeapon = GetComponent <Weapon>(); }
// Use this for initialization void Start() { playerMovement = GetComponent <PlayerMovement>(); playerHealthHandler = GetComponent <PlayerHealthHandler>(); _spriteRenderer = GetComponent(typeof(SpriteRenderer)) as SpriteRenderer; currentStand = stand; blinkCounter = 1.0f; blinkRate = 2.0f; blinkSpeed = 0.1f; animationRate = 0.6f; animationCounter = animationRate; }
void OnTriggerEnter(Collider other) { if (other.tag == "Player") { PlayerHealthHandler player = other.gameObject.GetComponent <PlayerHealthHandler>(); player.AddToCurrentHealth(replenishAmount); player.ShowPlayerHealthCanvas(); Destroy(gameObject); } }
// Use this for initialization void Start() { shieldPos = new Vector3(shield.transform.localPosition.x, 0.56f, 0); if (StaticPlayer.spawnPosition.z == 0) { this.transform.position = StaticPlayer.spawnPosition; } _mRigidBody = GetComponent <Rigidbody2D> (); _moveSpeed = 5f; _animator = GetComponent <Animator> (); _animator.SetBool("isCrouching", false); healthHandler = GetComponent <PlayerHealthHandler> (); }
void Start() { currentHealth = health; lightEffector = GetComponent <LightEffector>(); path = GetComponent <AIPath>(); destinationSetter = GetComponent <AIDestinationSetter>(); mainPlayerHealthHandler = GameObject.Find("Player").GetComponent <PlayerHealthHandler>(); mainPlayerPosition = GameObject.Find("Player").GetComponent <Transform>(); currentRechargeAttackTime = attackRate; currentPosition = GetComponent <Transform>(); fov = GetComponent <EnemyFieldOfView>(); currentTeleportTime = timeBetweenTeleports; }
void Start() { Instance = this; health = 5; healthText.text = health.ToString(); }
// Start is called before the first frame update void Start() { target = FindObjectOfType <PlayerHealthHandler>(); }
void Start() { player = FindObjectOfType <PlayerHealthHandler>(); gameOverCanvas.enabled = false; Time.timeScale = 1f; //fixes bug where timeScale is 0 after reloading scene }
// Use this for initialization void Start() { playerHealthHandler = player.GetComponent <PlayerHealthHandler>(); text = GetComponent <Text>(); }