mirror of
https://gitgud.io/AbstractConcept/rimworld-animation-studio.git
synced 2024-08-15 00:43:27 +00:00
Code refactor
This commit is contained in:
parent
cd4711a8e5
commit
757badf4f6
517 changed files with 2534 additions and 2221 deletions
|
@ -4,28 +4,69 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml.Serialization;
|
||||
using UnityEngine;
|
||||
|
||||
namespace RimWorldAnimationStudio
|
||||
{
|
||||
public class ActorAddon
|
||||
{
|
||||
// Data to/from animationDef
|
||||
public string addonName;
|
||||
public int anchoringActor;
|
||||
public int? anchoringActor;
|
||||
public string anchorName;
|
||||
public string layer = "Pawn";
|
||||
public float scale;
|
||||
public bool render;
|
||||
public float? scale;
|
||||
public bool? render;
|
||||
|
||||
// Data helper functions
|
||||
[XmlIgnore] public string AddonName
|
||||
{
|
||||
get { return addonName; }
|
||||
set { addonName = value; }
|
||||
}
|
||||
|
||||
[XmlIgnore] public int AnchoringActor
|
||||
{
|
||||
get { return anchoringActor.HasValue ? anchoringActor.Value : 0; }
|
||||
set { anchoringActor = value; EventsManager.OnActorAddonChanged(this); }
|
||||
}
|
||||
|
||||
[XmlIgnore] public string AnchorName
|
||||
{
|
||||
get { return anchorName; }
|
||||
set { anchorName = value; EventsManager.OnActorAddonChanged(this); }
|
||||
}
|
||||
|
||||
[XmlIgnore] public string Layer
|
||||
{
|
||||
get { return layer; }
|
||||
set { layer = value; EventsManager.OnActorAddonChanged(this); }
|
||||
}
|
||||
|
||||
[XmlIgnore] public float Scale
|
||||
{
|
||||
get { return scale.HasValue ? scale.Value : 0f; }
|
||||
set { scale = value; EventsManager.OnActorAddonChanged(this); }
|
||||
}
|
||||
|
||||
[XmlIgnore] public bool Render
|
||||
{
|
||||
get { return render == true; }
|
||||
set { render = value; EventsManager.OnActorAddonChanged(this); }
|
||||
}
|
||||
|
||||
// Simple curves
|
||||
[XmlIgnore] public SimpleCurve PosX = new SimpleCurve();
|
||||
[XmlIgnore] public SimpleCurve PosZ = new SimpleCurve();
|
||||
[XmlIgnore] public SimpleCurve Rotation = new SimpleCurve();
|
||||
|
||||
// Constructors
|
||||
public ActorAddon() { }
|
||||
|
||||
public ActorAddon(string addonName, float scale = 1f)
|
||||
{
|
||||
this.addonName = addonName;
|
||||
this.scale = scale;
|
||||
this.AddonName = addonName;
|
||||
this.Scale = scale;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue