-
Notifications
You must be signed in to change notification settings - Fork 0
UFO_animation Function
ShiyanSu edited this page Sep 14, 2021
·
3 revisions
The purpose of UFO animation is to Increase the difficulty of the game, When the player is close to ufo for a certain distance, ufo will chase the player.
-
ufo_animation.atlas
This file sets up different animation effects for obstacles. -
UfoAnimationController
This class listens to events relevant to a ufo state and plays the animation when one of the events is triggered. -
ObstacleFactory
Create ufo obstacle bycreatUFO()
,createUFO
can add tasks and animation effects to UFO.
ufo_animation-01.png
size: 8334, 7500
format: RGBA8888
filter: Nearest,Nearest
repeat: none
ufo
rotate: false
xy: 166, 705
size: 1237, 1667
orig: 1237, 1667
offset: 0, 0
index: 0
default
rotate: false
xy: 166, 705
size: 1237, 1667
orig: 1237, 1667
offset: 0, 0
index: 0
hit_ufo
rotate: false
xy: 166, 705
size: 1237, 1667
orig: 1237, 1667
offset: 0, 0
index: 0
hit_ufo
rotate: false
xy: 1831, 705
size: 1237, 1667
orig: 1237, 1667
offset: 0, 0
index: 1
hit_ufo
rotate: false
xy: 3498, 705
size: 1237, 1667
orig: 1237, 1667
offset: 0, 0
index: 2
hit_ufo
rotate: false
xy: 5165, 705
size: 1237, 1667
orig: 1237, 1667
offset: 0, 0
index: 3
AITaskComponent aiComponent =
new AITaskComponent()
.addTask(new WanderTask(new Vector2(3f, 2f), 0f))
.addTask(new ChaseTask(target, 2,2f,2.5f));
ufo.addComponent(aiComponent);
AnimationRenderComponent animator =
new AnimationRenderComponent(
ServiceLocator.getResourceService().getAsset("images/ufo_animation.atlas", TextureAtlas.class));
animator.addAnimation("hit_ufo", 0.5f, Animation.PlayMode.LOOP_REVERSED);
animator.addAnimation("ufo", 0.5f, Animation.PlayMode.LOOP);
ufo.addComponent(animator);
ufo.addComponent(new UfoAnimationController());
ufo.getComponent(AnimationRenderComponent.class).scaleEntity();
public class UfoAnimationController extends Component {
AnimationRenderComponent animator;
@Override
public void create() {
super.create();
animator = this.entity.getComponent(AnimationRenderComponent.class);
entity.getEvents().addListener("wanderStart", this::animateWander);
entity.getEvents().addListener("chaseStart", this::animateChase);
}
void animateWander() {
animator.startAnimation("ufo");
}
void animateChase() {
animator.startAnimation("hit_ufo");
}
}
- Player UI
- Popup Menus
- Obstacles
- Boss Enemies
- Progress Tracker
- Checkpoint Design and Functionality
- Score System
- Lives System
- Game Background
- Multiple game-level
- Visual Improvements
- Tutorial Level
- Character Design and Animations
- Character Damage Animations
- Player Animation Functionalities
- Player and Serpent Portal Transition
- Pop-up Menus
- Obstacles
- Lives & Score User Testing
- Buffs & Debuffs
- Buffs & Debuffs redesign
- Obstacle Animation
- Background Design
- Level 2 Background Appearance
- Enemy Monster User Testing
- Level 1 Floor Terrain Testing
- Introduction Screens User Testing
- Character Movement Interviews & User Testing
- Sound user testing
- Level 2 Obstacles and enemy
- Story, Loading, Level 4 and Win Condition Sound Design User Testing
- Giant Bug and Purple Squid animation user testing
- General Gameplay and Tutorial Level User Testing
- Level 4 Terrain User Testing
- Game Outro User Testing