Removed old engine classes. Needs to be done prior to checking-in the new engine classes re-wrote from ground up.
This commit is contained in:
parent
5a39a7995e
commit
5be2f9bf5b
39 changed files with 201 additions and 3300 deletions
73
Engine/Core/BaseObject.cs
Normal file
73
Engine/Core/BaseObject.cs
Normal file
|
@ -0,0 +1,73 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Engine.Core
|
||||
{
|
||||
public abstract class BaseObject
|
||||
{
|
||||
private string _Name;
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return _Name;
|
||||
}
|
||||
set
|
||||
{
|
||||
_Name = value;
|
||||
if (this.GetType().Name.StartsWith("Base"))
|
||||
Filename = value + "." + this.GetType().Name.Substring("Base".Length);
|
||||
else
|
||||
Filename = value + "." + this.GetType().Name;
|
||||
}
|
||||
}
|
||||
|
||||
private string _Filename;
|
||||
public string Filename
|
||||
{
|
||||
//Returns the name of the object + the objects Type as it's extension.
|
||||
//Filenames are generated by the class itself, users can not assign it.
|
||||
get
|
||||
{
|
||||
return _Filename;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (this.GetType().Name.StartsWith("Base"))
|
||||
{
|
||||
if (value.EndsWith("." + this.GetType().Name.Substring("Base".Length)))
|
||||
{
|
||||
_Filename = value;
|
||||
}
|
||||
else
|
||||
_Filename = value + "." + this.GetType().Name.Substring("Base".Length);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (value.EndsWith("." + this.GetType().Name))
|
||||
{
|
||||
_Filename = value;
|
||||
}
|
||||
else
|
||||
_Filename = value + "." + this.GetType().Name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string Description { get; set; }
|
||||
|
||||
|
||||
public BaseObject()
|
||||
{
|
||||
this.Name = DefaultName();
|
||||
}
|
||||
|
||||
private String DefaultName()
|
||||
{
|
||||
return "New " + this.GetType().Name;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue