mirror of
https://github.com/stride3d/stride
synced 2026-05-24 10:19:21 +00:00
17 lines
583 B
C#
17 lines
583 B
C#
|
|
// Copyright (c) Xenko contributors (https://xenko.com) and Silicon Studio Corp. (https://www.siliconstudio.co.jp)
|
||
|
|
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.
|
||
|
|
using Xenko.Animations;
|
||
|
|
using Xenko.Engine;
|
||
|
|
|
||
|
|
namespace GravitySensor
|
||
|
|
{
|
||
|
|
public class BallScript : StartupScript
|
||
|
|
{
|
||
|
|
public override void Start()
|
||
|
|
{
|
||
|
|
var sprite = Entity.Get<SpriteComponent>();
|
||
|
|
SpriteAnimation.Play(sprite, 0, sprite.SpriteProvider.SpritesCount - 1, AnimationRepeatMode.LoopInfinite, 2);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|