Commit Graph

36 Commits

Author SHA1 Message Date
Paul Chote
14607f55c5 Replace INotifyBuildComplete in render traits with conditions. 2018-10-07 19:29:34 +02:00
reaperrr
1098804f9b Make WithSpriteBody always use Animation.PlayRepeating
... for looped sequences.

PlayCustomAnimationRepeating looping back into itself via Action instead of simply using Animation.PlayRepeating is weird, and in fact causes a slight 'desync' in animation speed with Animation.PlayRepeating in at least one downstream mod.
2018-09-24 22:06:10 +02:00
Paul Chote
6b6167d37c Use the default sprite sequence for automatic mouse bounds. 2018-07-01 01:20:55 +02:00
Arular101
8a60918841 Update copyright notice year to 2018 2018-01-17 00:47:34 +01:00
Paul Chote
6f5d035e79 Introduce IMouseBounds and split/rework mouse rectangles.
The render bounds for an actor now include the area covered
by bibs, shadows, and any other widgets. In many cases this
area is much larger than we really want to consider for
tooltips and mouse selection.

An optional Margin is added to Selectable to support cases
like infantry, where we want the mouse area of the actor
to be larger than the drawn selection box.
2017-12-11 19:45:07 +01:00
reaperrr
917c6884ed Make WithSpriteBody a pausable trait
Allowing to drop the PauseAnimationWhenDisabled property (in favor of using PausOnCondition).
2017-11-13 03:09:05 +02:00
reaperrr
0103b7ca87 Make WithSpriteBody.PlayCustomAnimation resume loop of Sequence
...after it finished playing.
2017-08-23 12:34:00 +02:00
reaperrr
3b798897be Add Name ID field to WithSpriteBody 2017-05-14 00:22:26 -05:00
Taryn Hill
43317e0f5d Update copyright notice year to 2017 2016-12-31 23:46:13 -06:00
Paul Chote
268ed016ab Rename UpgradableTrait to ConditionalTrait. 2016-12-23 23:28:34 +00:00
Paul Chote
d0270ab866 Rename comments and documentation. 2016-12-23 15:17:02 +00:00
Paul Chote
23f4ae5027 Replace UpgradeMinEnabledLevel checks with an EnabledByDefault shim. 2016-11-19 17:19:25 +00:00
reaperrr
7955aeb1c3 Implement INotifyDamageStateChanged explicitly in WithSpriteBody 2016-10-22 18:21:52 +02:00
reaperrr
a6b09342bc Make INotifyBuildComplete require explicit implementation 2016-10-22 18:21:52 +02:00
teees
8724ed29bc Support dynamic offsets in ActorPreviews. 2016-06-15 20:36:08 +01:00
reaperrr
fd5a597966 Move Render traits to Traits.Render namespace 2016-04-15 20:43:04 +02:00
Taryn Hill
c02e6b68a3 Don't render WithSpriteBody if it is disabled 2016-04-01 19:33:12 -05:00
Paul Chote
e71225496b Clarify GPL version. 2016-02-21 16:30:48 +00:00
Paul Chote
b396965fd9 Update licence header year. 2016-02-21 16:27:31 +00:00
abcdefg30
72ac5240b8 Remove ISpriteBody 2015-12-20 18:44:55 +01:00
RoosterDragon
082ea6ba73 Refactor animation classes.
Specify pause function in constructors of Animation if required, and remove the unused pause function from AnimationWithOffset.

Cleanup Animation.cs and reduce code duplication.
2015-12-05 16:58:26 +00:00
atlimit8
85fab45451 Remove Actor.HasTrait<T>() 2015-09-19 09:49:23 -05:00
reaperrr
0785bdbcf1 Move WithSpriteBody pause check to constructor 2015-09-02 17:55:03 +02:00
reaperrr
9da56f51e2 Remove RenderBuilding 2015-08-30 15:44:59 +02:00
reaperrr
bc2b60be05 Extend WithSpriteBody funtionality
Move building placement range circle to PlaceBuilding, add
PauseAnimationWhenDisabled.
2015-08-29 23:10:22 +02:00
reaperrr
006e66a3c3 Refactored IQuantizeBodyOrientation implementation
Moved BodyOrientation and related interfaces from Game to Mods.Common.
Introduced QuantizeFacingsFromSequence trait.
With*Body render traits no longer implement IQuantizeBodyOrientation
themselves.
2015-08-24 00:48:56 +02:00
Pavel Penev
09f67d18bb Some internal "race" to "faction" renaming 2015-08-22 23:34:36 +03:00
reaperrr
281a87acbc Fix WithAttackAnimation breaking WithMoveAnimation 2015-08-08 17:00:38 +02:00
atlimit8
4976f9fec9 Add StartSequence to WithIdleOverlay & change V19.Husk 2015-07-26 12:53:09 -05:00
reaperrr
74b948342e Fix WithSpriteBody PlayCustomAnimationRepeating
Lacked damage stage awareness.
2015-07-25 10:28:05 +02:00
atlimit8
a9908bffb4 UpgradeManager after IUpgradables 2015-06-28 10:24:00 -05:00
Pavel Penev
55128b8f78 Merge pull request #8508 from reaperrr/damaged-sprites
Added support for damage stages to WithSpriteBody and WithTurret
2015-06-25 00:35:05 +03:00
Matthias Mailänder
7faebe874a check for missing sequence entries using lint 2015-06-20 22:22:59 +02:00
reaperrr
248e6b0e18 Adds support for damage-stage-based sequences to WithSpriteBody and WithTurret 2015-06-19 21:16:39 +02:00
reaperrr
0e3a53bec7 Added WithFacingSpriteBody trait.
Extracted AutoSelectionSize into its own trait.

RenderUnit -> RenderSprites + WithFacingSpriteBody upgrade rule

Remove RenderSimple dependencies of ThrowsParticle
and WithHarvestAnimation.
2015-06-04 14:42:08 +02:00
penev92
c5dead9098 Introduce WithSpriteBody trait
Add upgrade rules

Add ISpriteBody
2015-05-03 11:54:27 +03:00