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
5ca7e486f8
commit
e14a12f2ab
310 changed files with 4875 additions and 4102 deletions
|
@ -18,6 +18,12 @@ namespace RimWorldAnimationStudio
|
|||
public float? scale;
|
||||
public bool? render;
|
||||
|
||||
// Data serialization control
|
||||
public bool ShouldSerializeanchorName() { return string.IsNullOrEmpty(anchorName) == false && anchorName.ToLower() != "none"; }
|
||||
public bool ShouldSerializeanchoringActor() { return anchoringActor.HasValue; }
|
||||
public bool ShouldSerializescale() { return scale.HasValue; }
|
||||
public bool ShouldSerializerender() { return render == true; }
|
||||
|
||||
// Data helper functions
|
||||
[XmlIgnore] public string AddonName
|
||||
{
|
||||
|
|
15
Assets/Scripts/AnimationComponents/ActorAddonDef.cs
Normal file
15
Assets/Scripts/AnimationComponents/ActorAddonDef.cs
Normal file
|
@ -0,0 +1,15 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace RimWorldAnimationStudio
|
||||
{
|
||||
public class ActorAddonDef
|
||||
{
|
||||
public string addonName;
|
||||
public string label;
|
||||
public float scale = 1f;
|
||||
}
|
||||
}
|
11
Assets/Scripts/AnimationComponents/ActorAddonDef.cs.meta
Normal file
11
Assets/Scripts/AnimationComponents/ActorAddonDef.cs.meta
Normal file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 6d836663c2196924eab4a00f4f4ceb3d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -13,6 +13,12 @@ namespace RimWorldAnimationStudio
|
|||
public float? posZ;
|
||||
public float? rotation;
|
||||
|
||||
// Data serialization control
|
||||
public bool ShouldSerializeposX() { return posX.HasValue; }
|
||||
public bool ShouldSerializeposZ() { return posZ.HasValue; }
|
||||
public bool ShouldSerializerotation() { return rotation.HasValue; }
|
||||
|
||||
|
||||
// Data helper functions
|
||||
[XmlIgnore] public string AddonName
|
||||
{
|
||||
|
|
|
@ -72,6 +72,10 @@ namespace RimWorldAnimationStudio
|
|||
HeadBob.Clear();
|
||||
GenitalAngle.Clear();
|
||||
|
||||
AddActorAddon("left hand", 0.667f);
|
||||
AddActorAddon("right hand", 0.667f);
|
||||
AddActorAddon("dildo");
|
||||
|
||||
foreach (ActorAddon addon in Addons)
|
||||
{
|
||||
addon.PosX.Clear();
|
||||
|
@ -347,10 +351,6 @@ namespace RimWorldAnimationStudio
|
|||
{
|
||||
keyframe.OnPostLoad();
|
||||
}
|
||||
|
||||
AddActorAddon("left hand", 0.667f);
|
||||
AddActorAddon("right hand", 0.667f);
|
||||
AddActorAddon("dildo");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue