public void colorInLetter() { Debug.Log("colorInLetter()/in scene 2"); int rot = this.gameObject.transform.Find("SmallLetterWheel").GetComponent <RotationScript>().input - 'a'; string currentLetter = this.gameObject.transform.Find("Text").Find("Letter").gameObject.GetComponent <Text>().text; string currentLetterEnc = RotX.encryptText(rot, currentLetter); this.gameObject.transform.Find("BigLetterWheel").Find("Letters").Find(currentLetter.ToUpper()).gameObject.GetComponent <Text>().color = Color.green; this.gameObject.transform.Find("SmallLetterWheel").Find("Letters").Find(currentLetterEnc.ToUpper()).gameObject.GetComponent <Text>().color = Color.green; }
public void ReceiveTelemetry(TelemetryPayload payload) { // set position PosX.SetToNumber(Mathf.RoundToInt(payload.posx / 1000.0f)); PosY.SetToNumber(Mathf.RoundToInt(payload.posy / 1000.0f)); PosZ.SetToNumber(Mathf.RoundToInt(payload.posz / 1000.0f)); // x is the y-dim and y is heading RotX.SetToNumber(Mathf.RoundToInt(payload.roty)); var heading = (payload.rotx < 100) ? Mathf.CeilToInt(payload.rotx * -1) : Mathf.CeilToInt(360 - payload.rotx); RotY.SetToNumber(heading); }
public override string ToString() { return(String.Format("[{0}][{1}],[{2}],[{3}],[{4}],[{5}],[{6}],[{7}],[{8}],[{9}]", (Frame + 1).ToString().PadLeft(5), PosX.ToString().ToFixedString(size, ' ').PadRight(padding), PosY.ToString().ToFixedString(size, ' ').PadRight(padding), PosZ.ToString().ToFixedString(size, ' ').PadRight(padding), RotX.ToString().ToFixedString(size, ' ').PadRight(padding), RotY.ToString().ToFixedString(size, ' ').PadRight(padding), RotZ.ToString().ToFixedString(size, ' ').PadRight(padding), RotW.ToString().ToFixedString(size, ' ').PadRight(padding), ScaX.ToString().ToFixedString(size, ' ').PadRight(padding), ScaY.ToString().ToFixedString(size, ' ').PadRight(padding), ScaZ.ToString().ToFixedString(size, ' ').PadRight(padding))); }
public override int GetHashCode() { int hash = 1; if (Name.Length != 0) { hash ^= Name.GetHashCode(); } if (PosX != 0F) { hash ^= PosX.GetHashCode(); } if (PosY != 0F) { hash ^= PosY.GetHashCode(); } if (PosZ != 0F) { hash ^= PosZ.GetHashCode(); } if (RotX != 0F) { hash ^= RotX.GetHashCode(); } if (RotY != 0F) { hash ^= RotY.GetHashCode(); } if (RotZ != 0F) { hash ^= RotZ.GetHashCode(); } if (Hp != 0) { hash ^= Hp.GetHashCode(); } if (BossHp != 0) { hash ^= BossHp.GetHashCode(); } if (Target != 0) { hash ^= Target.GetHashCode(); } return(hash); }
public override int GetHashCode() { int hash = 1; if (Name.Length != 0) { hash ^= Name.GetHashCode(); } if (PosX != 0F) { hash ^= PosX.GetHashCode(); } if (PosY != 0F) { hash ^= PosY.GetHashCode(); } if (PosZ != 0F) { hash ^= PosZ.GetHashCode(); } if (RotX != 0F) { hash ^= RotX.GetHashCode(); } if (RotY != 0F) { hash ^= RotY.GetHashCode(); } if (RotZ != 0F) { hash ^= RotZ.GetHashCode(); } if (Hp != 0) { hash ^= Hp.GetHashCode(); } if (IsHit != false) { hash ^= IsHit.GetHashCode(); } return(hash); }
public Vector3 GetRotate(float frame) { return(new Vector3(RotX.GetFrameValue(frame), RotY.GetFrameValue(frame), RotZ.GetFrameValue(frame))); }