Exemplo n.º 1
0
 private void Start()
 {
     if (stopOnStart)
     {
         rotate = ROTATE.STOP;
     }
 }
Exemplo n.º 2
0
    public void Rotate(ROTATE rotation)
    {
        if (!can360)
        {
            if (transform.rotation.z < 0)
            {
                tryToRotate(new Vector3(0f, 0f, 90f));
            }
            else
            {
                tryToRotate(new Vector3(0f, 0f, -90f));
            }
        }
        else
        {
            switch (rotation)
            {
            case ROTATE.Right:

                tryToRotate(new Vector3(0f, 0f, -90f));

                break;

            case ROTATE.Left:

                tryToRotate(new Vector3(0f, 0f, 90f));

                break;

            default: break;
            }
        }
    }
Exemplo n.º 3
0
 public void Rotate(ROTATE rot)
 {
     rotate = rot;
 }
Exemplo n.º 4
0
        private void ExtractValues(string elementName, XmlReader reader)
        {
            this.repeatGap   = REPEAT_GAP_DEFAULT * displayModel.ScaleFactor;
            this.repeatStart = REPEAT_START_DEFAULT * displayModel.ScaleFactor;

            for (int i = 0; i < reader.AttributeCount; ++i)
            {
                reader.MoveToAttribute(i);

                string name  = reader.Name;
                string value = reader.Value;

                if (SRC.Equals(name))
                {
                    this.src = value;
                }
                else if (DISPLAY.Equals(name))
                {
                    this.display = Display.FromString(value);
                }
                else if (DY.Equals(name))
                {
                    this.dy = float.Parse(value) * displayModel.ScaleFactor;
                }
                else if (ALIGN_CENTER.Equals(name))
                {
                    this.alignCenter = bool.Parse(value);
                }
                else if (CAT.Equals(name))
                {
                    this.category = value;
                }
                else if (PRIORITY.Equals(name))
                {
                    this.priority = int.Parse(value);
                }
                else if (REPEAT.Equals(name))
                {
                    this.repeat = bool.Parse(value);
                }
                else if (REPEAT_GAP.Equals(name))
                {
                    this.repeatGap = float.Parse(value) * displayModel.ScaleFactor;
                }
                else if (REPEAT_START.Equals(name))
                {
                    this.repeatStart = float.Parse(value) * displayModel.ScaleFactor;
                }
                else if (ROTATE.Equals(name))
                {
                    this.rotate = bool.Parse(value);
                }
                else if (SYMBOL_HEIGHT.Equals(name))
                {
                    this.height = XmlUtils.ParseNonNegativeInteger(name, value) * displayModel.ScaleFactor;
                }
                else if (SYMBOL_PERCENT.Equals(name))
                {
                    this.percent = XmlUtils.ParseNonNegativeInteger(name, value);
                }
                else if (SYMBOL_SCALING.Equals(name))
                {
                    this.scaling = FromValue(value);
                }
                else if (SYMBOL_WIDTH.Equals(name))
                {
                    this.width = XmlUtils.ParseNonNegativeInteger(name, value) * displayModel.ScaleFactor;
                }
                else
                {
                    throw XmlUtils.CreateXmlReaderException(elementName, name, value, i);
                }
            }
        }