void Start() { remainingLevelTime = levelTime; if (levelTime == 0) { for (int i = 0; i < timeUI.Length; i++) { timeUI[i].SetActive(false); } } if (visionDisabled) { if (GameManager.GM.focusAvailable) { visionDisabled = false; for (int i = 0; i < visionUI.Length; i++) { visionUI[i].SetActive(true); } } else { for (int i = 0; i < visionUI.Length; i++) { visionUI[i].SetActive(false); } } } visionTransform = visionMeter.GetComponent <RectTransform>(); fadeRect = GameObject.Find("HUD/Black").GetComponent <RectTransform>(); FM = GetComponent <FocusMode>(); PC = GameObject.FindGameObjectWithTag("Player").GetComponent <HeroCharacterController>(); updateArmour(PC.health); FadeBlack(false); }
void Start() { kingAnim = transform.FindChild("NPCBody/Shaman").GetComponent <Animator>(); speechBubble = speechObject.transform; speechBubble.localScale = target; hero = GameObject.FindWithTag("Player"); HeroCC = hero.GetComponent <HeroCharacterController>(); }
void Start() { kingAnim = transform.FindChild("NPCBody/King").GetComponent <Animator>(); speechBubble = speechObject.transform; Hero = GameObject.FindGameObjectWithTag("Player"); HeroCC = Hero.GetComponent <HeroCharacterController>(); //speechText = transform.FindChild("NPCBody/SpeechBubble/Canvas/Text").GetComponent<Text>(); speechBubble.localScale = target; }
void Start() { npcBody = transform.FindChild("NPCBody"); spawnEffect = transform.FindChild("Poof").GetComponent <ParticleSystem>(); forceField = transform.FindChild("ForceField").gameObject; speechBubble.localScale = target; hero = GameObject.FindWithTag("Player"); HeroCC = hero.GetComponent <HeroCharacterController>(); }
// Use this for initialization void Start() { focusActive = false; PC = GameObject.FindGameObjectWithTag("Player").GetComponent <HeroCharacterController>(); anim = PC.GetComponent <Animator>(); doField = this.transform.GetComponent <DepthOfField>(); ccCurves = this.transform.GetComponent <ColorCorrectionCurves>(); particles = this.transform.GetComponent <ParticleSystem>(); maxFocusTime = focusTime; }
/*public override bool CanAttack() * { * return (!healed); * }*/ public override void Attack() { Shared.Framework.DamageType dmgtype = new Shared.Framework.DamageType(enemy.gameObject, "Healer"); HeroCharacterController HCC = GameObject.FindGameObjectWithTag("Player").GetComponent <HeroCharacterController>(); if (Vector3.Distance(transform.position, HCC.transform.position) < 3) { HCC.TakeDamage(-10, dmgtype); //healed = true; } }
void Start() { hero = GameObject.FindWithTag("Player").transform; speechBubble = speechObject.transform; body = transform.FindChild("NPCBody"); kingAnim = transform.FindChild("NPCBody/King").GetComponent <Animator>(); sphere = transform.FindChild("NPCBody/Sphere"); sphere.gameObject.SetActive(false); speechBubble.localScale = target; mainCamera = Camera.main; Hero = GameObject.FindGameObjectWithTag("Player"); HeroCC = Hero.GetComponent <HeroCharacterController>(); }