Giter VIP home page Giter VIP logo

Hi there πŸ‘‹

Π’ΡƒΡ‚ нарисуСм наш ΡˆΠ°Ρ€ΠΈΠΊ, Π½Π°Π·Ρ‹Π²Π°Π΅ΠΌ этот ΠΎΠ±ΡŠΠ΅ΠΊΡ‚ Ρ‚ΠΎΡ‡Π½ΠΎ Ρ‚Π°ΠΊΠΆΠ΅ ΠΊΠ°ΠΊ ΠΈ класс Π² ΠΊΠΎΠ΄Π΅

:

size: 50, 50

canvas:

Ellipse:

pos: self.pos

size: self.size

Π’ΡƒΡ‚ нарисуСм ΠΏΠ°Π½Π΅Π»ΡŒΠΊΡƒ ΠΈΠ³Ρ€ΠΎΠΊΠ°, Π½Π°Π·Ρ‹Π²Π°Π΅ΠΌ этот ΠΎΠ±ΡŠΠ΅ΠΊΡ‚ Ρ‚ΠΎΡ‡Π½ΠΎ Ρ‚Π°ΠΊΠΆΠ΅ ΠΊΠ°ΠΊ ΠΈ класс Π² ΠΊΠΎΠ΄Π΅

:

size: 25, 200

canvas:

Rectangle:

pos: self.pos

size: self.size

А это ΠΈΠ³Ρ€ΠΎΠ²ΠΎΠ΅ ΠΏΠΎΠ»Π΅ =)

:

Ρ‚ΡƒΡ‚ привязываСм ΡˆΠ°Ρ€ΠΈΠΊ ΠΊ свойству ball

ball: pong_ball

player1: player_left

player2: player_right

canvas:

Rectangle:

Π‘ΠΎΡ€Π΄ΡŽΡ€ посСрСдинС

pos: self.center_x - 5, 0

size: 10, self.height

Label:

ΠžΡ‡ΠΊΠΈ ΠΈΠ³Ρ€ΠΎΠΊΠ° слСва

font_size: 70

center_x: root.width / 4

top: root.top - 50

text: str(root.player1.score)

Label:

ΠžΡ‡ΠΊΠΈ ΠΈΠ³Ρ€ΠΎΠΊΠ° справа

font_size: 70

center_x: root.width * 3 / 4

top: root.top - 50

text: str(root.player2.score)

Π° Ρ‚ΡƒΡ‚ создаСм экзСмпляр нашСго ΡˆΠ°Ρ€ΠΈΠΊΠ° Π² ΠΈΠ³Ρ€ΠΎΠ²ΠΎΠΌ ΠΏΠΎΠ»Π΅

PongBall:

id: pong_ball

center: self.parent.center

создаСм ΠΈΠ³Ρ€ΠΎΠΊΠ° 1

PongPaddle:

id: player_left

x: root.x

center_y: root.center_y

создаСм ΠΈΠ³Ρ€ΠΎΠΊΠ° 2

PongPaddle:

id: player_right

x: root.width - self.width

center_y: root.center_y

botsol's Projects

vk-mini-app-boilerplate icon vk-mini-app-boilerplate

Π‘Ρ‚Π°Ρ€Ρ‚ΠΎΠ²Ρ‹ΠΉ ΠΊΠΈΡ‚ для создания сСрвиса Π½Π° ΠΏΠ»Π°Ρ‚Ρ„ΠΎΡ€ΠΌΠ΅ VK Mini Apps с использованиСм React + Redux

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.