SlideShare a Scribd company logo
1 of 17
Download to read offline
An Introducton to Game
Programming with Flash
2. Object Oriented Programming
What is O-O?
Researching problem from a perspectve of:
● Objects
● Dependencies
● Relatons
What can be O-O?
● Analysis
● Design
● Programming
Why O-O?
Easier:
● Analysis
● Design
● Programming and maintenance
Why is it so important?
package foo
{
public class Person
{
private var name:String;
public function Person(name:String)
{
this.name = name;
}
public function introduce():String
{
return "My name is " + name;
}
}
}
1
2
3
4
5
Class
import foo.Person;
var person:Person = new Person("John Smith");
person.introduce(); //My name is John Smith
1
2
Object
package foo
{
public class Rapper extends Person
{
public function Rapper(name:String)
{
super(name);
}
}
}
import foo.Rapper;
var snoopDog:Rapper = new Rapper("Snoop Dogg");
snoopDog.introduce(); //My name is Snoop Dogg
1
2
3
Inheritance
package foo
{
public class Rapper extends Person
{
public function Rapper(name:String)
{
super(name);
}
override public function introduce():String
{
return "YO! " + super.introduce();
}
}
}
import foo.Rapper;
var snoopDog:Rapper = new Rapper("Snoop Dogg");
snoopDog.introduce(); //YO! My name is Snoop Dogg
2
3
Polymorphism
1
Enakpsulaton
Hiding implementaton and exposing only desired API
Access modifiers:
● public – for everyone
● protected – only for the same class or subclasses
● internal – only for the same package
● private – only the same class
Interface
package foo
{
public interface IPerson
{
function introduce():String;
}
}
1
2
Statc fields and methods
package foo
{
public class Math
{
public static const PI:Number = 3.14;
public static function abs(value:Number):Number
{
return (value >= 0) ? value : -value;
}
}
}
Math.PI; //3.14
Math.abs(-5); //5
1
2
3
Good practces
● Single Responsibility Principle
● Open/Closed Principle
● Liskov Substtuton Principle
● Interface Segregaton Principle
● Dependency Inversion Principle
● ...
● Don't Repeat Yourself
● Law of Demeter
● ...
● COMMON SENCE!
Jet&Giant
git clone git://github.com/krzysztof-o/epi-
wdpg.git
Jet&Giant
Task 1
Moving a Giant:
● Giant can move horizontally and vertcally
● smoothing
Task 2
Enemies:
● Two classes should inherit from Enemy
● Enemy_1 moves quickly, along straight line
● Enemy_1 need single hit to be destroyed
● Enemy_2 moves slowly, along sine wave
● Enemy_2 needs double hit to be destroyed
enemy_1 enemy_2
Task 3
Giant – Enemy collision:
● Collision causes showing boom animaton
● Collision takes one Giant's life
Task 4
Shootng enemies:
● Enemies can shoot with random frequency
● Hitting Giant with bullet takes one life

More Related Content

What's hot

Dive into Pinkoi 2013
Dive into Pinkoi 2013Dive into Pinkoi 2013
Dive into Pinkoi 2013Mosky Liu
 
Collaborative Software Development
Collaborative Software DevelopmentCollaborative Software Development
Collaborative Software DevelopmentAlexander Serebrenik
 
[Question Paper] Network Security (Revised Syllabus) [October / 2012]
[Question Paper] Network Security (Revised Syllabus) [October / 2012][Question Paper] Network Security (Revised Syllabus) [October / 2012]
[Question Paper] Network Security (Revised Syllabus) [October / 2012]Mumbai B.Sc.IT Study
 

What's hot (6)

Dive into Pinkoi 2013
Dive into Pinkoi 2013Dive into Pinkoi 2013
Dive into Pinkoi 2013
 
Cryptography
CryptographyCryptography
Cryptography
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
 
Collaborative Software Development
Collaborative Software DevelopmentCollaborative Software Development
Collaborative Software Development
 
DLR MCQs
DLR MCQsDLR MCQs
DLR MCQs
 
[Question Paper] Network Security (Revised Syllabus) [October / 2012]
[Question Paper] Network Security (Revised Syllabus) [October / 2012][Question Paper] Network Security (Revised Syllabus) [October / 2012]
[Question Paper] Network Security (Revised Syllabus) [October / 2012]
 

Viewers also liked

The history of Flash
The history of FlashThe history of Flash
The history of FlashMaso Lin
 
АКТУАЛЬНО СОЦИО-ЭКОНОМИЧЕСКОЕ ПОЛОЖЕНИЕ ТРАНСГЕНДЕРНЫХ И КВИР ЛЮДЕЙ НА ПОСТСО...
АКТУАЛЬНО СОЦИО-ЭКОНОМИЧЕСКОЕ ПОЛОЖЕНИЕ ТРАНСГЕНДЕРНЫХ И КВИР ЛЮДЕЙ НА ПОСТСО...АКТУАЛЬНО СОЦИО-ЭКОНОМИЧЕСКОЕ ПОЛОЖЕНИЕ ТРАНСГЕНДЕРНЫХ И КВИР ЛЮДЕЙ НА ПОСТСО...
АКТУАЛЬНО СОЦИО-ЭКОНОМИЧЕСКОЕ ПОЛОЖЕНИЕ ТРАНСГЕНДЕРНЫХ И КВИР ЛЮДЕЙ НА ПОСТСО...Tangarr Forgart
 
Learning flash by Ms. Payal Narula
Learning flash by Ms. Payal Narula Learning flash by Ms. Payal Narula
Learning flash by Ms. Payal Narula kulachihansraj
 
Intro to Flash 8 welcome & course outline (2008)
Intro to Flash 8 welcome & course outline (2008)Intro to Flash 8 welcome & course outline (2008)
Intro to Flash 8 welcome & course outline (2008)Matteo Wyllyamz
 

Viewers also liked (6)

Flash8
Flash8Flash8
Flash8
 
The history of Flash
The history of FlashThe history of Flash
The history of Flash
 
АКТУАЛЬНО СОЦИО-ЭКОНОМИЧЕСКОЕ ПОЛОЖЕНИЕ ТРАНСГЕНДЕРНЫХ И КВИР ЛЮДЕЙ НА ПОСТСО...
АКТУАЛЬНО СОЦИО-ЭКОНОМИЧЕСКОЕ ПОЛОЖЕНИЕ ТРАНСГЕНДЕРНЫХ И КВИР ЛЮДЕЙ НА ПОСТСО...АКТУАЛЬНО СОЦИО-ЭКОНОМИЧЕСКОЕ ПОЛОЖЕНИЕ ТРАНСГЕНДЕРНЫХ И КВИР ЛЮДЕЙ НА ПОСТСО...
АКТУАЛЬНО СОЦИО-ЭКОНОМИЧЕСКОЕ ПОЛОЖЕНИЕ ТРАНСГЕНДЕРНЫХ И КВИР ЛЮДЕЙ НА ПОСТСО...
 
Learning flash by Ms. Payal Narula
Learning flash by Ms. Payal Narula Learning flash by Ms. Payal Narula
Learning flash by Ms. Payal Narula
 
English
EnglishEnglish
English
 
Intro to Flash 8 welcome & course outline (2008)
Intro to Flash 8 welcome & course outline (2008)Intro to Flash 8 welcome & course outline (2008)
Intro to Flash 8 welcome & course outline (2008)
 

Similar to An Introduction to Game Programming with Flash: Object Oriented Programming

Lies Told By The Kotlin Compiler
Lies Told By The Kotlin CompilerLies Told By The Kotlin Compiler
Lies Told By The Kotlin CompilerGarth Gilmour
 
Lies Told By The Kotlin Compiler
Lies Told By The Kotlin CompilerLies Told By The Kotlin Compiler
Lies Told By The Kotlin CompilerGarth Gilmour
 
Introduction to kotlin + spring boot demo
Introduction to kotlin + spring boot demoIntroduction to kotlin + spring boot demo
Introduction to kotlin + spring boot demoMuhammad Abdullah
 
On deriving the private key from a public key
On deriving the private key from a public keyOn deriving the private key from a public key
On deriving the private key from a public keyDharmalingam Ganesan
 
Functional Programming You Already Know - Kevlin Henney - Codemotion Rome 2015
Functional Programming You Already Know - Kevlin Henney - Codemotion Rome 2015Functional Programming You Already Know - Kevlin Henney - Codemotion Rome 2015
Functional Programming You Already Know - Kevlin Henney - Codemotion Rome 2015Codemotion
 
Implementation of oop concept in c++
Implementation of oop concept in c++Implementation of oop concept in c++
Implementation of oop concept in c++Swarup Kumar Boro
 
The mighty js_function
The mighty js_functionThe mighty js_function
The mighty js_functiontimotheeg
 
Embedded Rust and more
Embedded Rust and moreEmbedded Rust and more
Embedded Rust and moreKiwamu Okabe
 
Design Patterns in Game Programming
Design Patterns in Game ProgrammingDesign Patterns in Game Programming
Design Patterns in Game ProgrammingBruno Cicanci
 
Python-GTK
Python-GTKPython-GTK
Python-GTKYuren Ju
 
Golang basics for Java developers - Part 1
Golang basics for Java developers - Part 1Golang basics for Java developers - Part 1
Golang basics for Java developers - Part 1Robert Stern
 
Python GTK (Hacking Camp)
Python GTK (Hacking Camp)Python GTK (Hacking Camp)
Python GTK (Hacking Camp)Yuren Ju
 
Design patterns
Design patternsDesign patterns
Design patternsBa Tran
 
Trivadis TechEvent 2016 Go - The Cloud Programming Language by Andija Sisko
Trivadis TechEvent 2016 Go - The Cloud Programming Language by Andija SiskoTrivadis TechEvent 2016 Go - The Cloud Programming Language by Andija Sisko
Trivadis TechEvent 2016 Go - The Cloud Programming Language by Andija SiskoTrivadis
 
Spinners, Adapters & Fragment Communication
Spinners, Adapters & Fragment CommunicationSpinners, Adapters & Fragment Communication
Spinners, Adapters & Fragment CommunicationCITSimon
 

Similar to An Introduction to Game Programming with Flash: Object Oriented Programming (20)

Lies Told By The Kotlin Compiler
Lies Told By The Kotlin CompilerLies Told By The Kotlin Compiler
Lies Told By The Kotlin Compiler
 
05. haskell streaming io
05. haskell streaming io05. haskell streaming io
05. haskell streaming io
 
Lies Told By The Kotlin Compiler
Lies Told By The Kotlin CompilerLies Told By The Kotlin Compiler
Lies Told By The Kotlin Compiler
 
Java For Automation
Java   For AutomationJava   For Automation
Java For Automation
 
Introduction to kotlin + spring boot demo
Introduction to kotlin + spring boot demoIntroduction to kotlin + spring boot demo
Introduction to kotlin + spring boot demo
 
On deriving the private key from a public key
On deriving the private key from a public keyOn deriving the private key from a public key
On deriving the private key from a public key
 
Class or Object
Class or ObjectClass or Object
Class or Object
 
Lecture5
Lecture5Lecture5
Lecture5
 
Functional Programming You Already Know - Kevlin Henney - Codemotion Rome 2015
Functional Programming You Already Know - Kevlin Henney - Codemotion Rome 2015Functional Programming You Already Know - Kevlin Henney - Codemotion Rome 2015
Functional Programming You Already Know - Kevlin Henney - Codemotion Rome 2015
 
Implementation of oop concept in c++
Implementation of oop concept in c++Implementation of oop concept in c++
Implementation of oop concept in c++
 
The mighty js_function
The mighty js_functionThe mighty js_function
The mighty js_function
 
Embedded Rust and more
Embedded Rust and moreEmbedded Rust and more
Embedded Rust and more
 
Kotlin
KotlinKotlin
Kotlin
 
Design Patterns in Game Programming
Design Patterns in Game ProgrammingDesign Patterns in Game Programming
Design Patterns in Game Programming
 
Python-GTK
Python-GTKPython-GTK
Python-GTK
 
Golang basics for Java developers - Part 1
Golang basics for Java developers - Part 1Golang basics for Java developers - Part 1
Golang basics for Java developers - Part 1
 
Python GTK (Hacking Camp)
Python GTK (Hacking Camp)Python GTK (Hacking Camp)
Python GTK (Hacking Camp)
 
Design patterns
Design patternsDesign patterns
Design patterns
 
Trivadis TechEvent 2016 Go - The Cloud Programming Language by Andija Sisko
Trivadis TechEvent 2016 Go - The Cloud Programming Language by Andija SiskoTrivadis TechEvent 2016 Go - The Cloud Programming Language by Andija Sisko
Trivadis TechEvent 2016 Go - The Cloud Programming Language by Andija Sisko
 
Spinners, Adapters & Fragment Communication
Spinners, Adapters & Fragment CommunicationSpinners, Adapters & Fragment Communication
Spinners, Adapters & Fragment Communication
 

Recently uploaded

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 

Recently uploaded (20)

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 

An Introduction to Game Programming with Flash: Object Oriented Programming

  • 1. An Introducton to Game Programming with Flash 2. Object Oriented Programming
  • 2. What is O-O? Researching problem from a perspectve of: ● Objects ● Dependencies ● Relatons What can be O-O? ● Analysis ● Design ● Programming
  • 3. Why O-O? Easier: ● Analysis ● Design ● Programming and maintenance Why is it so important?
  • 4. package foo { public class Person { private var name:String; public function Person(name:String) { this.name = name; } public function introduce():String { return "My name is " + name; } } } 1 2 3 4 5 Class
  • 5. import foo.Person; var person:Person = new Person("John Smith"); person.introduce(); //My name is John Smith 1 2 Object
  • 6. package foo { public class Rapper extends Person { public function Rapper(name:String) { super(name); } } } import foo.Rapper; var snoopDog:Rapper = new Rapper("Snoop Dogg"); snoopDog.introduce(); //My name is Snoop Dogg 1 2 3 Inheritance
  • 7. package foo { public class Rapper extends Person { public function Rapper(name:String) { super(name); } override public function introduce():String { return "YO! " + super.introduce(); } } } import foo.Rapper; var snoopDog:Rapper = new Rapper("Snoop Dogg"); snoopDog.introduce(); //YO! My name is Snoop Dogg 2 3 Polymorphism 1
  • 8. Enakpsulaton Hiding implementaton and exposing only desired API Access modifiers: ● public – for everyone ● protected – only for the same class or subclasses ● internal – only for the same package ● private – only the same class
  • 9. Interface package foo { public interface IPerson { function introduce():String; } } 1 2
  • 10. Statc fields and methods package foo { public class Math { public static const PI:Number = 3.14; public static function abs(value:Number):Number { return (value >= 0) ? value : -value; } } } Math.PI; //3.14 Math.abs(-5); //5 1 2 3
  • 11. Good practces ● Single Responsibility Principle ● Open/Closed Principle ● Liskov Substtuton Principle ● Interface Segregaton Principle ● Dependency Inversion Principle ● ... ● Don't Repeat Yourself ● Law of Demeter ● ... ● COMMON SENCE!
  • 14. Task 1 Moving a Giant: ● Giant can move horizontally and vertcally ● smoothing
  • 15. Task 2 Enemies: ● Two classes should inherit from Enemy ● Enemy_1 moves quickly, along straight line ● Enemy_1 need single hit to be destroyed ● Enemy_2 moves slowly, along sine wave ● Enemy_2 needs double hit to be destroyed enemy_1 enemy_2
  • 16. Task 3 Giant – Enemy collision: ● Collision causes showing boom animaton ● Collision takes one Giant's life
  • 17. Task 4 Shootng enemies: ● Enemies can shoot with random frequency ● Hitting Giant with bullet takes one life