Candy for You: Design of Xianyu Flutter Interaction Engine Series

Image for post
Image for post

What Is Candy?

Background

Thinking

Flame or Independent Design

Candy Engine Design

Framework Design

Image for post
Image for post
Image for post
Image for post

Game System

Image for post
Image for post

Lifecycle

Image for post
Image for post

Rendering System

Image for post
Image for post

GUI System

final GUIObject gui = IdleFishGame.createGUI(
'gui',
child: GestureDetector(
child: Container(
width: 100.0,
height: 60.0,
decoration: BoxDecoration(
color: const Color(0xFFA9CCE3),
borderRadius: const BorderRadius.all(
Radius.circular(10.0),
),
),
child: const Center(
child: Text(
'Flutter UI example',
style: TextStyle(
fontSize: 14.0,
),
),
),
),
behavior: HitTestBehavior.opaque,
onTap: () {
print('UI is clicked');
},
),
position: Position(100, 100),
);
game.scene.addChild(gui);

Event System

Image for post
Image for post

Other Subsystems

Animation System

Resource System

Image for post
Image for post

Conclusion

Original Source:

Follow me to keep abreast with the latest technology news, industry insights, and developer trends.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store