//Using the timer to change the age state of the Yoshi need and calling to update the age ui private void UpdateAgeData(object sender, ElapsedEventArgs e) { TimeSpan ageTimeElapsed = e.SignalTime - ageTimeKeeper.AgeStartTime; AgeState newAgeState = yoshi.CurrentAgeState; if (ageTimeElapsed.TotalSeconds < 10) { newAgeState = AgeState.egg; } else if (ageTimeElapsed.TotalSeconds < 20) { newAgeState = AgeState.teen; } else if (ageTimeElapsed.TotalSeconds < 30) { newAgeState = AgeState.adult; } if (newAgeState != yoshi.CurrentAgeState) { yoshi.CurrentAgeState = newAgeState; updateAgeUI(); } }
private void SetNextAgeState() { int stateIndex = (int)currentAge; AgeState nextAgeState = (AgeState)stateIndex + 1; currentAge = nextAgeState; }
void Awake() { currentAge = AgeState.baby; currentAnimator = playerAnimators[0]; currentAnimatorIndex = 0; pc = GetComponent <PlayerController>(); activeObject = playerObjects[0]; objectIndex = 0; }
public void AgeTestMethod3() { var AgeStates3 = new AgeStates(); AgeState ageState3 = AgeState.adult; var expectedResult3 = "adult"; AgeState result3 = AgeStates.GetAgeState(expectedResult3); Assert.AreEqual(ageState3, result3); }
public void AgeTestMethod2() { var AgeStates2 = new AgeStates(); AgeState ageState2 = AgeState.egg; var expectedResult2 = "egg"; AgeState result2 = AgeStates.GetAgeState(expectedResult2); Assert.AreEqual(ageState2, result2); }
public void AgeTestMethod() { var AgeStates = new AgeStates(); AgeState ageState = AgeState.teen; var expectedResult = "teen"; AgeState result = AgeStates.GetAgeState(expectedResult); Assert.AreEqual(ageState, result); }
public static string GetAgeString(AgeState ageState) { switch (ageState) { case AgeState.egg: return("egg"); case AgeState.hatchling: return("hatchling"); case AgeState.teen: return("teen"); case AgeState.adult: return("adult"); case AgeState.elder: return("elder"); default: return("dead"); } }
// Token: 0x0600012F RID: 303 RVA: 0x00013D4C File Offset: 0x00011F4C public void SetAgeType(AgeState ageState) { this.m_AgeState = ageState; }
// Token: 0x06000119 RID: 281 RVA: 0x00012BC0 File Offset: 0x00010DC0 public void Start(byte AddictiveSwitch, byte RestrictLoginSwitch, RealNameState realNameState, AgeState ageState) { this.m_AntiAddictiveSwitch = AddictiveSwitch; this.m_RestrictLoginSwitch = RestrictLoginSwitch; this.m_RealNameState = realNameState; this.m_AgeState = ageState; this.GetStage(); this.SetCrossDaysSecond(); this.SetFinalRepeat(); this.bInit = true; }