/// <summary> /// Change to next Hero. /// </summary> public static void ChangeHero() { HeroStrong heroStrong = InputManager.Instance.heroStrong; HeroFast heroFast = InputManager.Instance.heroFast; Hero hero = GetActiveHero(); if (hero == null) { DisableControlAll(); lastActiveHero._OnFocus(); } else if (hero.Equals(heroStrong)) { heroStrong._OnFocusOut(); heroFast._OnFocus(); lastActiveHero = heroFast; } else if (hero.Equals(heroFast)) { heroFast._OnFocusOut(); heroStrong._OnFocus(); lastActiveHero = heroStrong; } else { DisableControlAll(); heroStrong._OnFocus(); lastActiveHero = heroStrong; } SoundManager.Instance.SendMessage("PlaySFXSwap"); }
void Start() { heroStrong = FindObjectOfType <HeroStrong>(); heroFast = FindObjectOfType <HeroFast> (); dialog = GetComponentInChildren <Dialog> (); cameraController = FindObjectOfType <CameraController> (); }
void Awake () { heroStrong = FindObjectOfType<HeroStrong>(); heroFast = FindObjectOfType<HeroFast>(); SelectionBoxCurrent = SelectionBox1; defaultColor = SelectionBox1.GetComponent<Renderer>().material.color; colorsPuzzle = this.GetComponent<ColorsPuzzle>(); }
void Start() { instance = this; heroStrong = FindObjectOfType <HeroStrong>(); heroFast = FindObjectOfType <HeroFast>(); heroStrongControl = heroStrong.GetComponent <HeroControl>(); heroFastControl = heroFast.GetComponent <HeroControl>(); }
void Awake() { heroStrong = FindObjectOfType <HeroStrong>(); heroFast = FindObjectOfType <HeroFast>(); SelectionBoxCurrent = SelectionBox1; defaultColor = SelectionBox1.GetComponent <Renderer>().material.color; colorsPuzzle = this.GetComponent <ColorsPuzzle>(); }
void Awake () { controller = GetComponentInParent<ClawController>(); coll = GetComponent<Collider2D>(); clawInitialPos = coll.bounds.center; heroStrong = FindObjectOfType<HeroStrong> (); heroFast = FindObjectOfType<HeroFast> (); heroStrongRigidBody = heroStrong.GetComponent<Rigidbody2D>(); heroFastRigidBody = heroFast.GetComponent<Rigidbody2D>(); }
void Awake() { clawMechanism = GetComponentInChildren<ClawMechanism>(); clawNode = GetComponentInChildren<ClawNode>(); clawPerSe = GetComponentInChildren<ClawPerSe>(); heroStrong = FindObjectOfType<HeroStrong> (); heroFast = FindObjectOfType<HeroFast>(); Terminal = GetComponentInChildren<InvisibleAreaTrigger>(); clawLastPosition = clawNode.GetComponent<Renderer>().bounds.center; cameraControl = FindObjectOfType<CameraController>(); }
void Awake() { controller = GetComponentInParent <ClawController>(); coll = GetComponent <Collider2D>(); clawInitialPos = coll.bounds.center; heroStrong = FindObjectOfType <HeroStrong> (); heroFast = FindObjectOfType <HeroFast> (); heroStrongRigidBody = heroStrong.GetComponent <Rigidbody2D>(); heroFastRigidBody = heroFast.GetComponent <Rigidbody2D>(); }
void Awake() { clawMechanism = GetComponentInChildren <ClawMechanism>(); clawNode = GetComponentInChildren <ClawNode>(); clawPerSe = GetComponentInChildren <ClawPerSe>(); heroStrong = FindObjectOfType <HeroStrong> (); heroFast = FindObjectOfType <HeroFast>(); Terminal = GetComponentInChildren <InvisibleAreaTrigger>(); clawLastPosition = clawNode.GetComponent <Renderer>().bounds.center; cameraControl = FindObjectOfType <CameraController>(); }
void Awake() { heroStrong = FindObjectOfType<HeroStrong>(); heroFast = FindObjectOfType<HeroFast>(); puzzleController = this.GetComponent<PuzzleController>(); }
void Awake() { heroStrong = FindObjectOfType <HeroStrong>(); heroFast = FindObjectOfType <HeroFast>(); puzzleController = this.GetComponent <PuzzleController>(); }
void Start() { heroStrong = FindObjectOfType<HeroStrong>(); heroFast = FindObjectOfType<HeroFast> (); dialog = GetComponentInChildren<Dialog> (); cameraController = FindObjectOfType<CameraController> (); }
void Start() { instance = this; heroStrong = FindObjectOfType <HeroStrong>(); heroFast = FindObjectOfType <HeroFast>(); }