Flick Cick זהו משחק של בעיטות עונשין לשער, של חברת PikPok. יצרתי prototype של המכניקה המרכזית שלו: בעיטת הכדור לשער. אפשר לראות את זה בפעולה כאן . יש כאן 2 חלקים חשובים: 1. תנועת ה-swipe שעושים עם האצבע (או עם העכבר, למי שבודק את זה עם המחשב) על מנת לשחרר בעיטה לכיוון המתאים ובעוצמה המתאימה (הפונקציה listenSwipe) 2. מה שקורה לכדור בזמן המעוף שלו אל השער (רוב הפונקציה update) /** * Created by codactive on 13/03/2016. */ // reference to typescript files /// <reference path="../lib/phaser.d.ts" /> module football{ export class Game extends Phaser.State{ // define variables ball: Phaser.Sprite; bar: Phaser.Sprite; // this is the bottom of the goal, used to simulate the floor line // these are the sides of the goal: leftSideBar: Phaser.Sprite; rightSideBar: Phaser.Sprite; ballMoving: boolean ; ballIsOut: boolean ; isTimerWorking: boolean ; timerDelay:number; ...