示例#1
0
        /// <summary>
        /// Calls a type of graphic depending on which
        /// key user inputs
        /// </summary>

        private void drawShape(string key)
        {
            if (key == "L")
            {
                typeOfGraphic = graphic.LINE;
            }
            if (key == "R")
            {
                typeOfGraphic = graphic.RECTANGLE;
            }
            if (key == "E")
            {
                typeOfGraphic = graphic.ELLIPSE;
            }
            if (key == "C")
            {
                typeOfGraphic = graphic.CIRCLE;
            }
            if (key == "S")
            {
                typeOfGraphic = graphic.SQUARE;
            }
            if (key == "M")
            {
                typeOfGraphic = graphic.FIGURE;
            }
            Refresh();
        }
示例#2
0
 public void addLastingEffectFor(graphic g, string effect, GameObject target)
 {
     graphics[(int)g].add_lastingEffect(lastingEffects[effect](target));
 }
示例#3
0
 public void addTimedEffectFor(graphic g, string effect, GameObject target)
 {
     graphics[(int)g].add_timedEffect(timedEffects[effect](target));
 }
示例#4
0
 public void removeLastingEffectFor(graphic g, string id)
 {
     graphics[(int)g].remove_lastingEffect(id);
 }