Beispiel #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();
        }
Beispiel #2
0
 public void addLastingEffectFor(graphic g, string effect, GameObject target)
 {
     graphics[(int)g].add_lastingEffect(lastingEffects[effect](target));
 }
Beispiel #3
0
 public void addTimedEffectFor(graphic g, string effect, GameObject target)
 {
     graphics[(int)g].add_timedEffect(timedEffects[effect](target));
 }
Beispiel #4
0
 public void removeLastingEffectFor(graphic g, string id)
 {
     graphics[(int)g].remove_lastingEffect(id);
 }