//public TypeVal createNewInstance(TypeVal tv) //{ // return tv.clone(); //} public TypeVal createNewInstance(string name) { TypeVal tv = lookUpAndClone(name); return(tv); //return tv.clone(); }
public Attribute(string name, string [] values, TypeAttrib type, TypeVal typeVal) { Name = name; Values = values; Type = type; TypeVal = typeVal; }
public PropertyDescriptor(bool secure, bool visible, string name, TypeVal typeVal) { this.name = name; this.TypeVal = typeVal; this.secure = secure; this.category = "Base Properties"; this.visible = visible; }
public override void configure() { TypeVal rt = this.getTypeValOfName("Sprite"); Sprite spr = (Sprite)rt.Value; spr.Scale *= 50; base.configure(); }
public override void configure() { TypeVal rt = this.getTypeValOfName("Sprite"); Sprite spr = (Sprite)rt.Value; spr.ImagePath = "debug.png"; spr.Scale = new Vector(2, 6); spr.Color = Color.Purple; spr.Tiled = true; getTypeValOfName("IsDebug").Value = true; base.configure(); }
public TypeVal createTypeVal(string displayName) { if (hasDisplayName(displayName)) { TypeVal val = typeVals[displayName]; return(val.clone()); } else { throw new WhiskeyException("There is no type name for " + displayName); } }
public override void configure() { TypeVal rt = this.getTypeValOfName("Sprite"); Sprite spr = (Sprite)rt.Value; spr.Depth = .3f; spr.Color = Color.Black; spr.Scale = Vector.One * 50; ShadowProperties shadowProps = getTypeValOfName("Shadows").Value as ShadowProperties; shadowProps.CastsShadows = true; base.configure(); }
void SetConst(ref string s, out double x, out int k, out TypeVal t) // константы { s = s.Trim(); x = 0; k = 0; t = TypeVal.tInt; string st = ""; x = 0; begin: if ((s != "") && Test(s[0], '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ',')) { if (Peek(ref s) == ',') { t = TypeVal.tFloat; } st += Pop(ref s, 1); goto begin; } else { if ((s != "") && Test(Peek(ref s), 'e', 'E')) { st += Pop(ref s, 1); if (t != TypeVal.tFloat) { throw new NodeException(11, "ошибка с типом"); } if (Test(s[0], '0', '1', '2', '3', '4', '5', '6', '7', '8', '9')) { goto begin; } else { throw new NodeException(11, "ошибка с e, E"); } } } if (st == "") { throw new NodeException(9, "ошибка в константах"); } if (t == TypeVal.tInt) { k = Convert.ToInt32(st); } else { x = Convert.ToDouble(st); } s = s.Trim(); }
public override void configure() { TypeVal rt = this.getTypeValOfName("Sprite"); Sprite spr = (Sprite)rt.Value; spr.ImagePath = "lightIcon.png"; spr.Depth = 1; spr.Scale *= .5f; TypeVal lt = this.getTypeValOfName("Light"); Light light = (Light)lt.Value; light.Visible = true; getTypeValOfName("IsDebug").Value = true; base.configure(); }
public PropertyDescriptor(bool secure, string name, TypeVal typeVal) : this(secure, true, name, typeVal) { }
public PropertyDescriptor(string name, TypeVal typeVal) : this(false, name, typeVal) { }
public NodeConst(TypeVal typeVal, object value) { this.typeVal = typeVal; this.value = value; }