public SceneObject() { Position = new Vector(); Rotation = new AngAxis(1, 0, 0, 0); Scale = new Vector(1, 1, 1); classname = "SceneObject"; }
public SceneObject(Vector position, AngAxis rotation, Vector scale) { Position = position; Rotation = rotation; Scale = scale; classname = "SceneObject"; }
public GameBase() { Position = new Vector(); Rotation = new AngAxis(1, 0, 0, 0); Scale = new Vector(); Datablock = "NULL"; classname = "GameBase"; }
public GameBase(string datablock) { Position = new Vector(); Rotation = new AngAxis(1, 0, 0, 0); Scale = new Vector(); Datablock = datablock; classname = "GameBase"; }
public string this[string field] { get { var fields = this.GetType().GetFields(); if (fields.Select(a => a.Name).Contains(field)) { return(this.GetType().GetField(field).GetValue(this).ToString()); } else { if (dynamicFields.ContainsKey(field)) { return(dynamicFields[field]); } else { return(""); } } } set { var fields = this.GetType().GetFields(); if (fields.Select(a => a.Name.ToLower()).Contains(field.ToLower())) { var thisfield = this.GetType().GetFields().First(a => a.Name.ToLower() == field.ToLower()); if (thisfield.FieldType == typeof(Boolean)) { if (value == "0") { value = bool.FalseString; } if (value == "1") { value = bool.TrueString; } } else if (thisfield.FieldType == typeof(Vector)) { var val = new Vector(value); thisfield.SetValue(this, val); } else if (thisfield.FieldType == typeof(AngAxis)) { var val = new AngAxis(value); thisfield.SetValue(this, val); } else { thisfield.SetValue(this, Convert.ChangeType(value, thisfield.FieldType)); } } else { if (dynamicFields.ContainsKey(field)) { dynamicFields[field] = value; } else { dynamicFields.Add(field, value); } } } }
public PathNode(Vector position,AngAxis rotation,Vector scale,string targetnode,string timetonext = "5000") : base("PathNode",position,rotation,scale) { this.targetnode = targetnode; this.timetonext = timetonext; }
public GameBase(Vector position, AngAxis rotation, Vector scale, string datablock) : base(position, rotation, scale) { Datablock = datablock; classname = "GameBase"; }