예제 #1
0
파일: Visual.cs 프로젝트: ThielHater/ZenVis
        public Visual(string fileName, Vector3 pos, zMAT3 rot3, bool visible)
        {
            try
            {
                fileName = fileName.ToUpper();

                if (!fileName.StartsWith("LEVEL"))
                {
                    string[] fileNameSplit = fileName.Split('.');

                    this.FileName = fileNameSplit[0];

                    if (fileNameSplit.Length == 2)
                    {
                        if (fileNameSplit[1].All(char.IsDigit))
                        {
                            this.FileExtension = "";
                            this.Index         = int.Parse(fileNameSplit[1]);
                        }
                        else
                        {
                            this.FileExtension = fileNameSplit[1];
                            this.Index         = 0;
                        }
                    }
                    else if (fileNameSplit.Length == 3)
                    {
                        this.FileExtension = fileNameSplit[1];
                        this.Index         = int.Parse(fileNameSplit[2]);
                    }
                }
                else
                {
                    this.FileName      = Path.GetFileNameWithoutExtension(fileName);
                    this.FileExtension = "3DS";
                    this.Index         = 0;
                }
            }
            catch
            {
                throw new ArgumentException(Localization.Instance.GetTranslation("ObjectNameInvalid"), fileName);
            }
            this.Position = pos;
            this.Rotation = rot3;
            this.Visible  = visible;
            string upper = Path.GetExtension(fileName);

            if (upper == ".ASC" || upper == ".MDS" || upper == ".MMS")
            {
                this.Scale = new Vector3(1f, -1f, -1f);
                return;
            }
            if (!(upper == ".3DS") && !(upper == ".MRM") && !(upper == ".MSH"))
            {
                this.Scale = new Vector3(1f, 1f, 1f);
                return;
            }
            this.Scale = new Vector3(-1f, -1f, 1f);
        }
예제 #2
0
파일: Item.cs 프로젝트: ThielHater/ZenVis
 public Item(string fileName, Vector3 pos, zMAT3 rot3, bool visible) : base(fileName, pos, rot3, visible)
 {
     // Items are always visible, even if showVisual=bool:0
     Visible = true;
 }
예제 #3
0
 public Level(string fileName, Vector3 pos, zMAT3 rot3, bool visible) : base(fileName, pos, rot3, visible)
 {
     this.Scale = new Vector3(1f, 1f, 1f);
 }
예제 #4
0
파일: Decal.cs 프로젝트: ThielHater/ZenVis
 public Decal(string fileName, Vector3 pos, zMAT3 rot3, Vector3 dim, bool visible) : base(fileName, pos, rot3, visible)
 {
     this.Dimensions = dim;
 }
예제 #5
0
 public Mob(string fileName, Vector3 pos, zMAT3 rot3, bool visible) : base(fileName, pos, rot3, visible)
 {
 }