mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 09:46:02 +08:00
[csharp] Some formatting and docs.
This commit is contained in:
parent
b194dbf2c8
commit
afde649c28
@ -250,7 +250,7 @@ namespace Spine {
|
|||||||
bool firstFrame = from.timelinesRotation.Count == 0;
|
bool firstFrame = from.timelinesRotation.Count == 0;
|
||||||
if (firstFrame) from.timelinesRotation.Resize(timelines.Count << 1); // from.timelinesRotation.setSize
|
if (firstFrame) from.timelinesRotation.Resize(timelines.Count << 1); // from.timelinesRotation.setSize
|
||||||
var timelinesRotation = from.timelinesRotation.Items;
|
var timelinesRotation = from.timelinesRotation.Items;
|
||||||
|
|
||||||
from.totalAlpha = 0;
|
from.totalAlpha = 0;
|
||||||
for (int i = 0; i < timelineCount; i++) {
|
for (int i = 0; i < timelineCount; i++) {
|
||||||
Timeline timeline = timelinesItems[i];
|
Timeline timeline = timelinesItems[i];
|
||||||
@ -507,10 +507,8 @@ namespace Spine {
|
|||||||
/// for a track. If the track is empty, it is equivalent to calling <see cref="SetAnimation"/>.</summary>
|
/// for a track. If the track is empty, it is equivalent to calling <see cref="SetAnimation"/>.</summary>
|
||||||
/// <param name="delay">
|
/// <param name="delay">
|
||||||
/// delay Seconds to begin this animation after the start of the previous animation. If <= 0, uses the duration of the
|
/// delay Seconds to begin this animation after the start of the previous animation. If <= 0, uses the duration of the
|
||||||
/// previous track entry minus any mix duration (from the <see cref="AnimationStateData"/>) plus the
|
/// previous track entry minus any mix duration plus the specified<code>delay</code>.If the previous entry is
|
||||||
/// specified<code>delay</code> (ie the mix ends at (<code>delay</code> = 0) or before (<code>delay</code> < 0) the previous
|
/// looping, its next loop completion is used instead of the duration.
|
||||||
/// track entry duration). If the previous entry is looping, its next loop completion is used
|
|
||||||
/// instead of the duration.
|
|
||||||
/// </param>
|
/// </param>
|
||||||
/// <returns>A track entry to allow further customization of animation playback. References to the track entry must not be kept
|
/// <returns>A track entry to allow further customization of animation playback. References to the track entry must not be kept
|
||||||
/// after <see cref="AnimationState.Dispose"/></returns>
|
/// after <see cref="AnimationState.Dispose"/></returns>
|
||||||
@ -777,7 +775,7 @@ namespace Spine {
|
|||||||
///<summary>
|
///<summary>
|
||||||
/// Seconds to postpone playing the animation. When a track entry is the current track entry, delay postpones incrementing
|
/// Seconds to postpone playing the animation. When a track entry is the current track entry, delay postpones incrementing
|
||||||
/// the track time. When a track entry is queued, delay is the time from the start of the previous animation to when the
|
/// the track time. When a track entry is queued, delay is the time from the start of the previous animation to when the
|
||||||
/// track entry will become the current track entry. <see cref="TrackEntry.TimeScale"/> affects the delay.</summary>
|
/// track entry will become the current track entry.</summary>
|
||||||
public float Delay { get { return delay; } set { delay = value; } }
|
public float Delay { get { return delay; } set { delay = value; } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -837,15 +835,8 @@ namespace Spine {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Multiplier for the delta time when the animation state is updated, causing time for all animations and mixes to play slower or
|
/// Multiplier for the delta time when the animation state is updated, causing time for this animation to play slower or
|
||||||
/// faster. Defaults to 1.
|
/// faster. Defaults to 1.
|
||||||
///
|
|
||||||
/// <see cref="TrackEntry.MixTime"/> is not affected by track entry time scale, so <see cref="TrackEntry.MixDuration"/> may need to
|
|
||||||
// be adjusted to match the animation speed.
|
|
||||||
///
|
|
||||||
/// When using <see cref="AnimationState.AddAnimation(int, Animation, boolean, float)"> with a <code>delay</code> <= 0, note the
|
|
||||||
/// {<see cref="TrackEntry.Delay"/> is set using the mix duration from the <see cref="AnimationStateData"/>, assuming time scale to be 1. If
|
|
||||||
/// the time scale is not 1, the delay may need to be adjusted.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public float TimeScale { get { return timeScale; } set { timeScale = value; } }
|
public float TimeScale { get { return timeScale; } set { timeScale = value; } }
|
||||||
|
|
||||||
@ -899,15 +890,14 @@ namespace Spine {
|
|||||||
/// In that case, the mixDuration must be set before <see cref="AnimationState.Update(float)"/> is next called.
|
/// In that case, the mixDuration must be set before <see cref="AnimationState.Update(float)"/> is next called.
|
||||||
/// <para>
|
/// <para>
|
||||||
/// When using <seealso cref="AnimationState.AddAnimation(int, Animation, bool, float)"/> with a
|
/// When using <seealso cref="AnimationState.AddAnimation(int, Animation, bool, float)"/> with a
|
||||||
/// <code>delay</code> less than or equal to 0, note the <seealso cref="Delay"/> is set using the mix duration from the <see cref=" AnimationStateData"/>,
|
/// <code>delay</code> less than or equal to 0, note the <seealso cref="Delay"/> is set using the mix duration from the <see cref=" AnimationStateData"/>
|
||||||
/// not a mix duration set afterward.
|
|
||||||
/// </para>
|
/// </para>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public float MixDuration { get { return mixDuration; } set { mixDuration = value; } }
|
public float MixDuration { get { return mixDuration; } set { mixDuration = value; } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Controls how properties keyed in the animation are mixed with lower tracks. Defaults to {@link MixBlend#replace}, which
|
/// Controls how properties keyed in the animation are mixed with lower tracks. Defaults to {@link MixBlend#replace}, which
|
||||||
/// replaces the values from the lower tracks with the animation values. {@link MixBlend#add} adds the animation values to
|
/// replaces the values from the lower tracks with the animation values. {@link MixBlend#add} adds the animation values to
|
||||||
/// the values from the lower tracks.
|
/// the values from the lower tracks.
|
||||||
/// <para>
|
/// <para>
|
||||||
@ -924,9 +914,9 @@ namespace Spine {
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// If true, when mixing from the previous animation to this animation, the previous animation is applied as normal instead of being mixed out.
|
/// If true, when mixing from the previous animation to this animation, the previous animation is applied as normal instead of being mixed out.
|
||||||
///
|
///
|
||||||
/// When mixing between animations that key the same property, if a lower track also keys that property then the value will briefly dip toward the lower track value during the mix. This happens because the first animation mixes from 100% to 0% while the second animation mixes from 0% to 100%. Setting HoldPrevious to true applies the first animation at 100% during the mix so the lower track value is overwritten. Such dipping does not occur on the lowest track which keys the property, only when a higher track also keys the property.
|
/// When mixing between animations that key the same property, if a lower track also keys that property then the value will briefly dip toward the lower track value during the mix. This happens because the first animation mixes from 100% to 0% while the second animation mixes from 0% to 100%. Setting HoldPrevious to true applies the first animation at 100% during the mix so the lower track value is overwritten. Such dipping does not occur on the lowest track which keys the property, only when a higher track also keys the property.
|
||||||
///
|
///
|
||||||
/// Snapping will occur if HoldPrevious is true and this animation does not key all the same properties as the previous animation.
|
/// Snapping will occur if HoldPrevious is true and this animation does not key all the same properties as the previous animation.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool HoldPrevious { get { return holdPrevious; } set { holdPrevious = value; } }
|
public bool HoldPrevious { get { return holdPrevious; } set { holdPrevious = value; } }
|
||||||
|
|||||||
@ -17,10 +17,10 @@
|
|||||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
// permit persons to whom the Software is furnished to do so, subject to
|
// permit persons to whom the Software is furnished to do so, subject to
|
||||||
// the following conditions:
|
// the following conditions:
|
||||||
//
|
//
|
||||||
// The above copyright notice and this permission notice shall be
|
// The above copyright notice and this permission notice shall be
|
||||||
// included in all copies or substantial portions of the Software.
|
// included in all copies or substantial portions of the Software.
|
||||||
//
|
//
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
@ -82,8 +82,8 @@ namespace Spine {
|
|||||||
version++;
|
version++;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void GrowIfNeeded (int newCount) {
|
public void GrowIfNeeded (int addedCount) {
|
||||||
int minimumSize = Count + newCount;
|
int minimumSize = Count + addedCount;
|
||||||
if (minimumSize > Items.Length)
|
if (minimumSize > Items.Length)
|
||||||
Capacity = Math.Max(Math.Max(Capacity * 2, DefaultCapacity), minimumSize);
|
Capacity = Math.Max(Math.Max(Capacity * 2, DefaultCapacity), minimumSize);
|
||||||
}
|
}
|
||||||
@ -466,7 +466,7 @@ namespace Spine {
|
|||||||
public T Pop () {
|
public T Pop () {
|
||||||
if (Count == 0)
|
if (Count == 0)
|
||||||
throw new InvalidOperationException("List is empty. Nothing to pop.");
|
throw new InvalidOperationException("List is empty. Nothing to pop.");
|
||||||
|
|
||||||
int i = Count - 1;
|
int i = Count - 1;
|
||||||
T item = Items[i];
|
T item = Items[i];
|
||||||
Items[i] = default(T);
|
Items[i] = default(T);
|
||||||
|
|||||||
@ -71,7 +71,7 @@ namespace Spine {
|
|||||||
public void Apply () {
|
public void Apply () {
|
||||||
Update();
|
Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Update () {
|
public void Update () {
|
||||||
PathAttachment attachment = target.Attachment as PathAttachment;
|
PathAttachment attachment = target.Attachment as PathAttachment;
|
||||||
if (attachment == null) return;
|
if (attachment == null) return;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user