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
49
Assets/Scripts/AnimationComponents/AddonKeyFrame.cs
Normal file
49
Assets/Scripts/AnimationComponents/AddonKeyFrame.cs
Normal file
|
@ -0,0 +1,49 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Xml;
|
||||
using System.Xml.Serialization;
|
||||
using UnityEngine;
|
||||
|
||||
namespace RimWorldAnimationStudio
|
||||
{
|
||||
public class AddonKeyframe
|
||||
{
|
||||
// Data to/from animationDef
|
||||
public string addonName;
|
||||
public float? posX;
|
||||
public float? posZ;
|
||||
public float? rotation;
|
||||
|
||||
// Data helper functions
|
||||
[XmlIgnore] public string AddonName
|
||||
{
|
||||
get { return addonName; }
|
||||
set { addonName = value; }
|
||||
}
|
||||
|
||||
[XmlIgnore] public float PosX
|
||||
{
|
||||
get { return posX.HasValue ? posX.Value : 0f; }
|
||||
set { posX = value; EventsManager.OnAddonKeyframeChanged(this); }
|
||||
}
|
||||
|
||||
[XmlIgnore] public float PosZ
|
||||
{
|
||||
get { return posZ.HasValue ? posZ.Value : 0f; }
|
||||
set { posZ = value; EventsManager.OnAddonKeyframeChanged(this); }
|
||||
}
|
||||
|
||||
[XmlIgnore] public float Rotation
|
||||
{
|
||||
get { return rotation.HasValue ? rotation.Value : 0f; }
|
||||
set { rotation = value; EventsManager.OnAddonKeyframeChanged(this); }
|
||||
}
|
||||
|
||||
// Constructors
|
||||
public AddonKeyframe() { }
|
||||
|
||||
public AddonKeyframe(string addonName)
|
||||
{
|
||||
this.AddonName = addonName;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue