// Use this for initialization void Start() { hm = this.GetComponentInParent <HealthManagement>(); getBackToFeetTimer = hm.getBackToFeetTimer; m_material = GetComponent <Renderer>().material; currentTimer = 0; }
// Use this for initialization void Start() { angle = Random.Range(0, 360); // displacement = new Vector2(Mathf.Cos(Mathf.Deg2Rad * angle), Mathf.Sin(Mathf.Deg2Rad * angle)); transform.eulerAngles = new Vector3(0, 0, angle); rb = GetComponent <Rigidbody2D>(); player = GameObject.FindGameObjectWithTag("Player").GetComponent <HealthManagement>(); }
public AudioSource pickupSound; //pickup sound for finding object // Use this for initialization private void OnTriggerEnter2D(Collider2D other) { if (other.GetComponent <PlayerController>() == null) //if it's just sitting there and we haven't touched it { return; } HealthManagement.DamagePlayer(-healthToGive); Destroy(gameObject); }
// ----------------- ---------------- ---------------- ---------------- ---------------- ---------------- // // Defines All Attributes And Instances That'll Be Run On Awake void Awake() { // ---------- ---------- ---------- ---------- // // Determines Whether All Necessiary Attributes Are Accessiable And Defined if (representation == "toxicity") healthManagement = this.gameObject.GetComponent <HealthManagement> (); // ---------- ---------- ---------- ---------- // // Defines A Fresh Material To Be Utilized By The Inherent Gameobject this.gameObject.GetComponent <Renderer> ().material = new Material ( Shader.Find ( "Standard" ) ); }
void Start() { startingPosition = transform.localPosition; inventory = GameObject.FindObjectOfType <Inventory>(); player = FindObjectOfType <GvrHead>(); healthManagement = FindObjectOfType <HealthManagement> (); glow = GetComponent <Glow> (); if (glow == null) { glow = GetComponentInChildren <Glow> (); } }
public void HealthManagementUpdateCoreHealthTest() { var healthManagement = new HealthManagement(); int originalHealth = 100; healthManagement.coreHealth = originalHealth; int damage = 10; healthManagement.updateCoreHealth(damage); //Health of core is expected to be decreased by damage Assert.That(healthManagement.coreHealth, Is.EqualTo(originalHealth - damage)); }
// Use this for initialization void Start() { m_animator = GetComponent <Animator>(); fov = GetComponent <TitansFieldOfView>(); tm = GetComponent <Titan_Mouvement>(); hm = GetComponent <HealthManagement>(); roars = GetComponents <AudioSource>(); sphereCollider = sphereAttack.GetComponent <SphereCollider>(); sphereCollider.enabled = false; attackParticule = attackEffect.GetComponent <ParticleSystem>(); //StartCoroutine(UnAggroRoutine()); InvokeRepeating("UnAggroRoutine2", 2.0f, 5.0f); }
public List <StatusEffect> StatusEffects; //List of status effects on the player #region SetUp // Use this for initialization void Awake() { //Set Up References healthManagement = GameObject.FindGameObjectWithTag("GameManager").GetComponent <HealthManagement> (); timeScaleSpeed = GameObject.FindGameObjectWithTag("GameManager").GetComponent <TimeScaleSpeed> (); dungeonCanvasRefs = GameObject.FindGameObjectWithTag("DungeonCanvas").GetComponent <DungeonCanvasRefs> (); playerMovement = this.GetComponent <PlayerMovement> (); //Set Up other parameters InvincibilityStopwatch = new Stopwatch(); MaxPlayerHealth = DataContainer.maxPlayerHealth; PlayerHealth = DataContainer.maxPlayerHealth; InvincibilityTime = 1 + DataContainer.additionalInvincibilityTime; //Set Up Items in Inventory and apply SetUpItems(); }
private void Start() { dataManager = gameManager.GetComponent <DataManager>(); timeManager = gameManager.GetComponent <TimeManager>(); healthManagement = gameManager.GetComponent <HealthManagement>(); }
void Awake() { HealthManager = FindObjectOfType <HealthManagement>(); spawnBord = GetComponent <SpawnBord>(); animator = GetComponent <Animator>(); }
public void Consume(GameObject player) { HealthManagement hm = player.GetComponentInChildren <HealthManagement>(); hm.AdjustHealth(potency); }
// Use this for initialization void Start() { hm = this.GetComponentInParent <HealthManagement>(); m_material = GetComponent <Renderer>().material; }