Game Development Reference
In-Depth Information
The following is what we are aiming for in the animation, a simple alpha transition to fade
the Goblin out and then fade the tombstone in:
To recreate this, perform the following steps:
1. Click on
0:00
on the timeframe to select the start point.
2. Make sure the record button is enabled.
3. Select the
Goblin
game object in the hierarchy.
4. Open the
Color
editor for the
SpriteRenderer
(by clicking on the color box) and
alter the
A
(alpha) value; it doesn't matter to what. This just adds the property to
the animation curve.
5. At position
0:00
, set the value of
Goblin : Sprite Renderer.Color.a
to
1
.
6. At position
0:30
, set the value of
Goblin : Sprite Renderer.Color.a
to
0.5
.
7. At position
1:00
, set the value of
Goblin : Sprite Renderer.Color.a
to
0
.
8. Select the position
0:00
in the timeframe.
9. Select the
Tombstone
game object in the hierarchy.
10. Open the
Color
editor for the SpriteRender and alter the
A
(alpha) value.
11. At position
0:00
, set the value of
Tombstone: Sprite Renderer.Color.a
to
0
.
12. At position
0:30
, set the value of
Tombstone: Sprite Renderer.Color.a
to
0
(you
might have to set it to
1
first and then reset it back to
0
to stick).
13. At position
1:00
, set the value of
Tombstone: Sprite Renderer.Color.a
to
0.5
.
14. At position
1:30
, set the value of
Tombstone: Sprite Renderer.Color.a
to
1
.