// Use this for initialization void Start() { sp01 = GameObject.FindGameObjectsWithTag("sp01"); increaseRound(); player = GameObject.FindGameObjectWithTag("Player"); HealthController = player.GetComponent <healthController> (); }
protected virtual void OnTriggerEnter2D(Collider2D other) { if (harmEnemies && other.CompareTag("Enemy")) { healthController hc = other.GetComponent <healthController>(); hc.takeDamage(3.0f); } }
public void selfDestruct() { healthController hc = GetComponentInParent <healthController>(); if (hc) { hc.takeNoDamage = false; } Destroy(gameObject); }
// Start is called before the first frame update void Start() { anim = GetComponent <Animator>(); healthController hc = GetComponentInParent <healthController>(); if (hc) { hc.takeNoDamage = true; } AtlasEventManager.Instance.onPlayerLand += OnLanding; }
// Use this for initialization void Start() { health = GetComponent <healthController>(); maxHealth = health.health; red = new Texture2D(1, 1); red.SetPixel(0, 0, Color.red); red.wrapMode = TextureWrapMode.Repeat; red.Apply(); green = new Texture2D(1, 1); green.SetPixel(0, 0, Color.green); green.wrapMode = TextureWrapMode.Repeat; green.Apply(); }
// Start is called before the first frame update void Start() { health = GetComponent <healthController>(); anim = GetComponentInChildren <Animator>(); controller = GetComponent <characterController>(); deformer = GetComponentInChildren <Deformer>(); facing = (int)transform.localScale.x; setFacing(); gravity = gameManager.Instance.gravity; maxFallVel = gameManager.Instance.maxFallVel; state = State.Movement; act = (readyToPounce) ? 0 : actionCoolDown; }
// Start is called before the first frame update void Start() { cc = GetComponent <characterController>(); hc = GetComponent <healthController>(); anim = GetComponentInChildren <Animator>(); deformer = GetComponentInChildren <Deformer>(); while (startDir == 0) { startDir = Random.Range(-1, 1); } velocity = Vector3.right * startDir; }
// Use this for initialization void Start() { player = GameObject.FindGameObjectWithTag("Player"); skyboxCameraHolder = GameObject.FindGameObjectWithTag("skyboxViewer"); cameraHolder = GameObject.FindGameObjectWithTag("cameraHolder"); playerMove = player.GetComponent <playerMove>(); aimdownsights = weaponHolder.GetComponent <aimDownSights> (); healthcontroller = player.GetComponent <healthController> (); armsAnimator = arms.GetComponent <Animator>(); cameraAnimator = cameraHolder.GetComponent <Animator> (); skyboxCameraAnimator = skyboxCameraHolder.GetComponent <Animator> (); weaponAnimator = GetComponent <Animator> (); rounds = magSize; weaponAudio = GetComponent <AudioSource> (); }
// Start is called before the first frame update protected virtual void Start() { anim = GetComponentInChildren <Animator>(); controller = GetComponent <characterController>(); deformer = GetComponentInChildren <Deformer>(); boxCollider = GetComponent <BoxCollider2D>(); healthCtrl = GetComponent <healthController>(); sprite = transform.Find("sprite"); gravity = gameManager.Instance.gravity; maxFallVel = gameManager.Instance.maxFallVel; state = new StateMachine("Movement"); state.addStates("Hurt", "Wait", "Attack"); intangibleStates = state.findStates("Hurt", "Wait"); state.setState("Movement"); }
// Start is called before the first frame update void Start() { hc = GetComponentInParent <healthController>(); Destroy(gameObject, duration); }