protected override void setupPattern() { string[] patternArray = new string[] { "A", "B", "X", "Y" }; pattern = patternArray [Random.Range(0, patternArray.Length)]; //Get First Button to highlight currentButton = "Button" + pattern[0]; faceDict.TryGetValue(currentButton, out buttonValue); ButtonsOverlay.GetComponent <UI_Glyphs_PressThis>().faceID = buttonValue; //Get the animators AAnimator = ButtonA.GetComponent <Animator>(); BAnimator = ButtonB.GetComponent <Animator>(); XAnimator = ButtonX.GetComponent <Animator>(); YAnimator = ButtonY.GetComponent <Animator>(); //Light up the buttons contained in the pattern e.g. BABY will not light up X if (pattern.Contains("A")) { AAnimator.SetBool("On", true); } if (pattern.Contains("B")) { BAnimator.SetBool("On", true); } if (pattern.Contains("X")) { XAnimator.SetBool("On", true); } if (pattern.Contains("Y")) { YAnimator.SetBool("On", true); } }
public float gravity_cutoff = -50f; //If the y velocity is below this value stop applying gravity private void Awake() { player = ReInput.players.GetPlayer(playerId); _rigidbody2D = this.GetComponent <Rigidbody2D>(); _characterCollider = this.GetComponent <BoxCollider2D>(); _xAnimator = this.GetComponent <XAnimator>(); sfxPlayer = this.GetComponent <SFXController>(); staminaSystem = this.GetComponent <StaminaSystem>(); }
public AnimationCompleteEvent(XAnimator animator) { this.sender = animator; }