private void            comboBox_Rotate_SelectedIndexChanged(object aSender, EventArgs aEventArgs)
        {
            ERotation lNewAngle = (ERotation)comboBox_Rotate.SelectedIndex;

            if (lNewAngle != mTextLabel.Rotation)
            {
                mTextLabel.Rotation = lNewAngle;
            }
        }
        public void                 loadFromXML(XmlTextReader aXMLTextReader)
        {
            var lReader = new XMLAttributeReader(aXMLTextReader);

            mX        = lReader.getAttribute <Int32>("X");
            mY        = lReader.getAttribute <Int32>("Y");
            mText     = lReader.getAttribute <string>("Text");
            TextFont  = lReader.getAttribute <Font>("Font", mTextFont);
            TextColor = lReader.getAttribute <Color>("Color", mTextColor);
            mRotation = (ERotation)Enum.Parse(typeof(ERotation), lReader.getAttribute <String>("Rotation", ERotation.Rotate0.ToString()));
        }
Beispiel #3
0
    void RotatePlayerView(ERotation Rot, GameObject Player, Tile[,] PlayerMap)
    {
        Player.transform.Rotate (0, 0, (int)Rot * 90);
        Player.GetComponentInChildren<Animator> ().gameObject.transform.Rotate (0, 180, 0);

        for (int i = 0; i < MapHeight; i++)
        {
            for (int j = 0; j < MapLength; j++)
            {
                PlayerMap[i,j].gameObject.transform.Rotate (0, 0, (int)Rot * 90);
            }
        }
    }