本文整理汇总了C#中Spine.Skeleton.SetSlotsToSetupPose方法的典型用法代码示例。如果您正苦于以下问题:C# Skeleton.SetSlotsToSetupPose方法的具体用法?C# Skeleton.SetSlotsToSetupPose怎么用?C# Skeleton.SetSlotsToSetupPose使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Spine.Skeleton
的用法示例。
在下文中一共展示了Skeleton.SetSlotsToSetupPose方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Animation
public Animation(string AnimationFile)
{
skeletonRenderer = new SkeletonRenderer();
String name = AnimationFile;
Atlas atlas = new Atlas("Data/" + name + ".atlas", new GLImpTextureLoader());
SkeletonJson json = new SkeletonJson(atlas);
skeleton = new Skeleton(json.ReadSkeletonData("Data/" + name + ".json"));
skeleton.SetSlotsToSetupPose();
// Define mixing between animations.
stateData = new AnimationStateData(skeleton.Data);
state = new AnimationState(stateData);
//state.SetAnimation("idle", true);
skeleton.X = 0;
skeleton.Y = 0.1f;
skeleton.UpdateWorldTransform();
drawtime = new Stopwatch();
drawtime.Start();
Program.MiddleDrawQueue += Draw;
}
示例2: AnimationPlayer
public AnimationPlayer(SkeletonData skeletonData)
{
this.skeletonData = skeletonData;
skeleton = new Skeleton(skeletonData);
skeleton.SetSlotsToSetupPose();
animationDataPool = new ObjectPool<AnimationData>(() => new AnimationData(), 10);
}
示例3: Initialize
public virtual void Initialize()
{
mesh = new Mesh();
GetComponent<MeshFilter>().mesh = mesh;
mesh.name = "Skeleton Mesh";
mesh.hideFlags = HideFlags.HideAndDontSave;
skeleton = new Skeleton(skeletonDataAsset.GetSkeletonData(false));
if (initialSkinName != null && initialSkinName.Length > 0) {
skeleton.SetSkin(initialSkinName);
skeleton.SetSlotsToSetupPose();
}
}
示例4: SpinePlayer
public SpinePlayer(string atlasPath, string jsonPath)
{
Name = jsonPath;
_skeletonRenderer = new SkeletonRenderer(Render.Device);
var atlas = new Atlas(atlasPath, new XnaTextureLoader(Render.Device));
var json = new SkeletonJson(atlas);
Skeleton = new Skeleton(json.ReadSkeletonData(jsonPath));
Skeleton.SetSlotsToSetupPose(); // Without this the skin attachments won't be attached. See SetSkin.
var stateData = new AnimationStateData(Skeleton.Data);
State = new AnimationState(stateData);
IsVisible = true;
}
示例5: LoadContent
protected override void LoadContent()
{
Effect spriteBatchEffect = Content.Load<Effect>("SpriteBatchEffect");
spriteBatch = new SpriteBatchEx(GraphicsDevice, spriteBatchEffect);
Bone.yDown = true;
skeletonData = Content.Load<SkeletonData>("spineboy/spineboy");
skeleton = new Skeleton(skeletonData);
skeleton.SetSlotsToSetupPose();
AnimationStateData stateData = new AnimationStateData(skeleton.Data);
animationState = new AnimationState(stateData);
animationState.SetAnimation(0, "walk", true);
skeleton.UpdateWorldTransform();
}
示例6: Initialize
public virtual void Initialize()
{
mesh = new Mesh();
GetComponent<MeshFilter>().mesh = mesh;
mesh.name = "Skeleton Mesh";
mesh.hideFlags = HideFlags.HideAndDontSave;
mesh.MarkDynamic();
renderer.sharedMaterial = skeletonDataAsset.atlasAsset.material;
vertices = new Vector3[0];
skeleton = new Skeleton(skeletonDataAsset.GetSkeletonData(false));
if (initialSkinName != null && initialSkinName.Length > 0) {
skeleton.SetSkin(initialSkinName);
skeleton.SetSlotsToSetupPose();
}
}
示例7: Avatar
public Avatar(string AnimationFile)
{
SkeletonRenderer = new SkeletonRenderer(Vector3.UnitY, Vector3.UnitZ);
String name = AnimationFile;
Atlas atlas = new Atlas(name + ".atlas", new OpenTKTextureLoader());
SkeletonJson json = new SkeletonJson(atlas);
Skeleton = new Skeleton(json.ReadSkeletonData(name + ".json"));
Skeleton.SetSlotsToSetupPose();
// Define mixing between animations.
StateData = new AnimationStateData(Skeleton.Data);
State = new AnimationState(StateData);
Skeleton.X = 0;
Skeleton.Y = 0;
Skeleton.UpdateWorldTransform();
}
示例8: LoadContent
protected override void LoadContent()
{
skeletonRenderer = new SkeletonRenderer(GraphicsDevice);
String name = "spineboy"; // "goblins";
Atlas atlas = new Atlas("data/" + name + ".atlas", new XnaTextureLoader(GraphicsDevice));
SkeletonJson json = new SkeletonJson(atlas);
skeleton = new Skeleton(json.ReadSkeletonData("data/" + name + ".json"));
if (name == "goblins") skeleton.SetSkin("goblingirl");
skeleton.SetSlotsToSetupPose(); // Without this the skin attachments won't be attached. See SetSkin.
// Define mixing between animations.
AnimationStateData stateData = new AnimationStateData(skeleton.Data);
if (name == "spineboy") {
stateData.SetMix("walk", "jump", 0.2f);
stateData.SetMix("jump", "walk", 0.4f);
}
state = new AnimationState(stateData);
if (true) {
// Event handling for all animations.
state.Start += new EventHandler(Start);
state.End += new EventHandler(End);
state.Complete += new EventHandler<CompleteArgs>(Complete);
state.Event += new EventHandler<EventTriggeredArgs>(Event);
state.SetAnimation("drawOrder", true);
} else {
state.SetAnimation("walk", false);
QueueEntry entry = state.AddAnimation("jump", false);
entry.End += new EventHandler(End); // Event handling for queued animations.
state.AddAnimation("walk", true);
}
skeleton.X = 320;
skeleton.Y = 440;
skeleton.UpdateWorldTransform();
headSlot = skeleton.FindSlot("head");
}
示例9: Initialize
public virtual void Initialize()
{
if (Initialized) return;
meshFilter = GetComponent<MeshFilter>();
mesh1 = newMesh();
mesh2 = newMesh();
vertices = new Vector3[0];
skeleton = new Skeleton(skeletonDataAsset.GetSkeletonData(false));
if (initialSkinName != null && initialSkinName.Length > 0 && initialSkinName != "default") {
skeleton.SetSkin(initialSkinName);
skeleton.SetSlotsToSetupPose();
}
}
示例10: Load
public void Load()
{
mSkeletonRenderer = new SkeletonRenderer(EngineSettings.Graphics.GraphicsDevice);
mBounds = new SkeletonBounds();
mSkeleton = SpineDataManager.Instance.NewSkeleton(mName, mScale); //Fixed Scale from here. Main instanciation.
mSkeleton.SetSlotsToSetupPose(); // Without this the skin attachments won't be attached. See SetSkin.
mAnimationState = SpineDataManager.Instance.NewAnimationState(mSkeleton.Data);
mSkeleton.X = mInitPosition.X;
mSkeleton.Y = mInitPosition.Y;
}
示例11: LoadContent
protected override void LoadContent()
{
skeletonRenderer = new SkeletonRenderer(GraphicsDevice);
String name = "spineboy"; // "goblins";
Atlas atlas = new Atlas("data/" + name + ".atlas", new XnaTextureLoader(GraphicsDevice));
SkeletonJson json = new SkeletonJson(atlas);
skeleton = new Skeleton(json.ReadSkeletonData("data/" + name + ".json"));
if (name == "goblins") skeleton.SetSkin("goblingirl");
skeleton.SetSlotsToSetupPose(); // Without this the skin attachments won't be attached. See SetSkin.
// Define mixing between animations.
AnimationStateData stateData = new AnimationStateData(skeleton.Data);
if (name == "spineboy") {
stateData.SetMix("walk", "jump", 0.2f);
stateData.SetMix("jump", "walk", 0.4f);
}
state = new AnimationState(stateData);
state.SetAnimation("walk", false);
state.AddAnimation("jump", false);
state.AddAnimation("walk", true);
skeleton.RootBone.X = 320;
skeleton.RootBone.Y = 440;
skeleton.UpdateWorldTransform();
}