From 59431ef6a8340de2e3a8eb260eb5422ed6695acd Mon Sep 17 00:00:00 2001 From: fdai7222 Date: Wed, 18 May 2022 17:23:04 +0200 Subject: [PATCH] hausaufgabe 5 gemacht :) --- spaceinvaders/GameProject/bin/.gitignore | 2 + .../bin/playground/LevelMovingObjects.class | Bin 443 -> 1151 bytes .../playground/SpaceInvadersLevelTest.class | Bin 1566 -> 0 bytes .../GameProject/doc/allclasses-index.html | 154 +-------------- .../GameProject/doc/allpackages-index.html | 19 +- .../doc/controller/ReboundController.html | 178 ++++++++++++++++++ .../class-use/ReboundController.html | 57 ++++++ .../doc/controller/package-summary.html | 42 +---- .../doc/controller/package-tree.html | 26 +-- .../doc/controller/package-use.html | 56 +----- spaceinvaders/GameProject/doc/element-list | 6 - spaceinvaders/GameProject/doc/help-doc.html | 17 +- .../GameProject/doc/index-files/index-1.html | 87 ++------- .../GameProject/doc/index-files/index-2.html | 21 ++- .../GameProject/doc/index-files/index-3.html | 84 +-------- spaceinvaders/GameProject/doc/index.html | 81 ++------ .../GameProject/doc/jquery-ui.overrides.css | 42 ++--- .../GameProject/doc/member-search-index.js | 2 +- .../GameProject/doc/overview-tree.html | 85 +-------- .../GameProject/doc/package-search-index.js | 2 +- spaceinvaders/GameProject/doc/script.js | 42 ++--- spaceinvaders/GameProject/doc/search.js | 34 ++-- .../GameProject/doc/tag-search-index.js | 2 +- .../GameProject/doc/type-search-index.js | 2 +- spaceinvaders/GameProject/log/log4j.log | 87 +++++++++ .../src/controller/ReboundController.java | 17 ++ .../src/playground/LevelMovingObjects.java | 13 ++ 27 files changed, 488 insertions(+), 670 deletions(-) create mode 100644 spaceinvaders/GameProject/bin/.gitignore delete mode 100644 spaceinvaders/GameProject/bin/playground/SpaceInvadersLevelTest.class create mode 100644 spaceinvaders/GameProject/doc/controller/ReboundController.html create mode 100644 spaceinvaders/GameProject/doc/controller/class-use/ReboundController.html create mode 100644 spaceinvaders/GameProject/src/controller/ReboundController.java diff --git a/spaceinvaders/GameProject/bin/.gitignore b/spaceinvaders/GameProject/bin/.gitignore new file mode 100644 index 0000000..c230a76 --- /dev/null +++ b/spaceinvaders/GameProject/bin/.gitignore @@ -0,0 +1,2 @@ +/playground/ +/controller/ diff --git a/spaceinvaders/GameProject/bin/playground/LevelMovingObjects.class b/spaceinvaders/GameProject/bin/playground/LevelMovingObjects.class index f9b49b2afba6cf15f6d32c8c438fe2dc5b17d536..690324e2cc4a62402dc37dafef55b880783ebff9 100644 GIT binary patch literal 1151 zcmaJ=TTc@~6#j;mF0IR@rA30sMMc{!u!<;Rk&xC)OcuOUYj~Wtle%QtZKm6bZ~h7Y zhx$MhNsQ0_DC5~n+CtUMX3m*CXXg99bI$(y{rv}kP3$TdVYu3~_{WBH+IC$xL`PWr zPRFzxFRDkP=C%|>&!?1|ye6L89bOl*<>xcRc1+uJcNrqtT!kT8a_S<12;wS65o4G% zOj{hZkE=qy;Z;j8qztFVtqPZ>w+}x?-S=jTVbS<6qXL84l%mO{2;nnXRK6s@)>Iw!F``I9OG#P-Bq=)C$A zI=j9_9E(_1u*5LogYplqUUDo)s0QtwLw zdBi=Yx{BMl!!S-)_rnZZS!3XQaC1Li$o&hPVZ^L^Z69hBRlgckpJDdg@qUx2<%z0u z5&|(S43ZcULD|WMaLX>2Zo9cJS}oq7kxOTD!{}q6>`XB6OM#r$l0R0FI z-o#!W{x{Y=F<7QfMEu!^kVo@Qt3rF7EF(LrbusppoDn2w^}-{C75uxiseK{f31uZtQETr?_>7{9zYs2ditRSbx_C zoFhnJikKy_Lao&>jSZyn02!Zz7664L2$G_AiN*@$Y~mi#-XKc%u|+DQbZR@KxJK5K W5=lM$LS|6i;()qHPu-56_2>`D>J94v delta 123 zcmey*v74Fe)W2Q(7#J8#7(^y=?U?+SNt;n{GC#8yBh%z4W~~Tz25z7v4+A5RWChZ^ tK$?YtkAWX3!VYBX0%?#Ovyi|BAjQPM1ti(PLPAJdnW0)48HB*9gaPfF46gtH diff --git a/spaceinvaders/GameProject/bin/playground/SpaceInvadersLevelTest.class b/spaceinvaders/GameProject/bin/playground/SpaceInvadersLevelTest.class deleted file mode 100644 index 2ec45de2b6301d2f6a635da8d9e68fcf674e59f9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1566 zcmbW0Ur!T35Wr_kp~ry&MGysL5!4n9eUKN$m{i2jC=k7tR-Ld>sz$=cO4t<* z)Uk(M3~Csg9Ap{HpNp<21tM&f-qp|1Hw<#^UZTTb-5UwnV=(nnhSI!ZFi|L;Fv#w! z2D&f-GqaEbhrygDLp!@p@9w39fr+g8d2rcb>Ak3OG88g@%?au~HKIdaJ$I)wS zDvkSrh{@1B`0Qh3qzdC4EHYTU%4+zB!Rm)jXk^<~LdKH3m%~sQk(e=<@%qSe5bWjP zHpPAoqP5Zv++k2T4mHLq=wgHWsvXH7vFDLi1Z=G&cOB`B7#uo diff --git a/spaceinvaders/GameProject/doc/allclasses-index.html b/spaceinvaders/GameProject/doc/allclasses-index.html index 55bf21c..f455a99 100644 --- a/spaceinvaders/GameProject/doc/allclasses-index.html +++ b/spaceinvaders/GameProject/doc/allclasses-index.html @@ -1,11 +1,11 @@ - + All Classes and Interfaces - + @@ -28,8 +28,7 @@ loadScripts(document, 'script'); diff --git a/spaceinvaders/GameProject/doc/allpackages-index.html b/spaceinvaders/GameProject/doc/allpackages-index.html index 4c4d7fe..17136e2 100644 --- a/spaceinvaders/GameProject/doc/allpackages-index.html +++ b/spaceinvaders/GameProject/doc/allpackages-index.html @@ -1,11 +1,11 @@ - + All Packages - + @@ -28,8 +28,7 @@ loadScripts(document, 'script'); diff --git a/spaceinvaders/GameProject/doc/controller/ReboundController.html b/spaceinvaders/GameProject/doc/controller/ReboundController.html new file mode 100644 index 0000000..fd98b1e --- /dev/null +++ b/spaceinvaders/GameProject/doc/controller/ReboundController.html @@ -0,0 +1,178 @@ + + + + +ReboundController + + + + + + + + + + + + + + + +
+ +
+
+ +
+
Package controller
+

Class ReboundController

+
+
java.lang.Object +
controller.ObjectController +
controller.ReboundController
+
+
+
+
+
public class ReboundController +extends controller.ObjectController
+
+
+
    + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    + +
     
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    + +
    +
    Is called once every game time step by the game itself.
    +
    +
    +
    +
    +
    +

    Methods inherited from class controller.ObjectController

    +applySpeedVector, getPlayground, getTimestep, getVX, getVY, getX, getY, setDummy, setObject, setPlayground, setVX, setVY, setX, setY
    +
    +

    Methods inherited from class java.lang.Object

    +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ReboundController

      +
      public ReboundController()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      updateObject

      +
      public void updateObject()
      +
      Description copied from class: controller.ObjectController
      +
      Is called once every game time step by the game itself. NEVER call this directly, not + necessary!
      + The method can do whatever it likes, including nothing. The attribute ObjectController.gameObject + contains a reference to the controlled object, which allows access to the Playground the object + belongs to (useful for getting the pixel size in x and y of the playing field.
      + Recommended: when implementing this method, call at the end + ObjectController.applySpeedVector() method. This is a helper method that sets the new x,y coordinates + for the ObjectController.gameObject correctly.
      +
      +
      Specified by:
      +
      updateObject in class controller.ObjectController
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/spaceinvaders/GameProject/doc/controller/class-use/ReboundController.html b/spaceinvaders/GameProject/doc/controller/class-use/ReboundController.html new file mode 100644 index 0000000..70a8ab8 --- /dev/null +++ b/spaceinvaders/GameProject/doc/controller/class-use/ReboundController.html @@ -0,0 +1,57 @@ + + + + +Uses of Class controller.ReboundController + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
controller.ReboundController

+
+No usage of controller.ReboundController
+
+
+ + diff --git a/spaceinvaders/GameProject/doc/controller/package-summary.html b/spaceinvaders/GameProject/doc/controller/package-summary.html index 322f557..1a7d806 100644 --- a/spaceinvaders/GameProject/doc/controller/package-summary.html +++ b/spaceinvaders/GameProject/doc/controller/package-summary.html @@ -1,11 +1,11 @@ - + controller - + @@ -28,7 +28,6 @@ loadScripts(document, 'script');
    @@ -79,38 +78,7 @@ loadScripts(document, 'script');
    Class
    Description
    - -
    -
    An EgoController which cannot move through obstacle objects (is collission aware).
    -
    - -
    -
    Controller using key events for up, down, left, right and space (shooting) to control the ego - object behavior.
    -
    - -
    -
    This class controls the space invaders.
    -
    - -
    -
    Controls background stars.
    -
    - -
    -
    Controls and abject that is deleted after a lifetime specified in the constructor, and when it - leaves the display.
    -
    - -
     
    - -
    -
    Class that controls the LOGICAL behavior of an object independently of how it is displayed or - drawn.
    -
    - -
     
    - +
     
    diff --git a/spaceinvaders/GameProject/doc/controller/package-tree.html b/spaceinvaders/GameProject/doc/controller/package-tree.html index bc19fea..7545a9a 100644 --- a/spaceinvaders/GameProject/doc/controller/package-tree.html +++ b/spaceinvaders/GameProject/doc/controller/package-tree.html @@ -1,11 +1,11 @@ - + controller Class Hierarchy - + @@ -28,7 +28,6 @@ loadScripts(document, 'script');
-
-

Constant Field Values

-

The Constant Field Values page lists the static final fields and their values.

-

All Packages

The All Packages page contains an alphabetic index of all packages contained in the documentation.

diff --git a/spaceinvaders/GameProject/doc/index-files/index-1.html b/spaceinvaders/GameProject/doc/index-files/index-1.html index 2e207dd..ec48665 100644 --- a/spaceinvaders/GameProject/doc/index-files/index-1.html +++ b/spaceinvaders/GameProject/doc/index-files/index-1.html @@ -1,12 +1,12 @@ - -A-Index + +C-Index - - + + @@ -28,8 +28,7 @@ loadScripts(document, 'script'); diff --git a/spaceinvaders/GameProject/doc/index-files/index-2.html b/spaceinvaders/GameProject/doc/index-files/index-2.html index 4e0e0d5..22eff4b 100644 --- a/spaceinvaders/GameProject/doc/index-files/index-2.html +++ b/spaceinvaders/GameProject/doc/index-files/index-2.html @@ -1,12 +1,12 @@ - -B-Index + +R-Index - - + + @@ -28,8 +28,7 @@ loadScripts(document, 'script'); diff --git a/spaceinvaders/GameProject/doc/index-files/index-3.html b/spaceinvaders/GameProject/doc/index-files/index-3.html index e5aaf44..97955ba 100644 --- a/spaceinvaders/GameProject/doc/index-files/index-3.html +++ b/spaceinvaders/GameProject/doc/index-files/index-3.html @@ -1,12 +1,12 @@ - -C-Index + +U-Index - - + + @@ -28,8 +28,7 @@ loadScripts(document, 'script'); diff --git a/spaceinvaders/GameProject/doc/index.html b/spaceinvaders/GameProject/doc/index.html index 8d3ce8f..b98bc3a 100644 --- a/spaceinvaders/GameProject/doc/index.html +++ b/spaceinvaders/GameProject/doc/index.html @@ -1,79 +1,26 @@ - -Overview + +Generated Documentation (Untitled) - - - + + + + - - - - - - - - + -
- -
+ +
-
-
Packages
-
-
Package
-
Description
- -
 
- -
 
- -
-
The controller package contains Object controllers that govern an objects behavior, without being - involved in its collision or drawing properties.
-
- -
 
- -
 
- -
 
- -
 
-
-
+ +

controller/package-summary.html

-
-
diff --git a/spaceinvaders/GameProject/doc/jquery-ui.overrides.css b/spaceinvaders/GameProject/doc/jquery-ui.overrides.css index 1abff95..f89acb6 100644 --- a/spaceinvaders/GameProject/doc/jquery-ui.overrides.css +++ b/spaceinvaders/GameProject/doc/jquery-ui.overrides.css @@ -1,26 +1,26 @@ /* * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. - * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. */ .ui-state-active, diff --git a/spaceinvaders/GameProject/doc/member-search-index.js b/spaceinvaders/GameProject/doc/member-search-index.js index c04a9e7..d62b223 100644 --- a/spaceinvaders/GameProject/doc/member-search-index.js +++ b/spaceinvaders/GameProject/doc/member-search-index.js @@ -1 +1 @@ -memberSearchIndex = [{"p":"ui","c":"GameUI","l":"ACTION_ABOUT"},{"p":"ui","c":"GameUI","l":"ACTION_BUTTON"},{"p":"ui","c":"GameUI","l":"ACTION_LOAD"},{"p":"ui","c":"GameUI","l":"ACTION_NEW"},{"p":"ui","c":"GameUI","l":"ACTION_PAUSE"},{"p":"ui","c":"GameUI","l":"ACTION_QUIT"},{"p":"ui","c":"GameUI","l":"ACTION_RESET"},{"p":"ui","c":"GameUI","l":"ACTION_SAVE"},{"p":"ui","c":"GameUI","l":"actionPerformed(ActionEvent)","u":"actionPerformed(java.awt.event.ActionEvent)"},{"p":"gameobjects","c":"GameObject","l":"addArtist(Artist)","u":"addArtist(rendering.Artist)"},{"p":"gameobjects","c":"GameObject","l":"addCollider(Collider)","u":"addCollider(collider.Collider)"},{"p":"gameobjects","c":"GameObject","l":"addController(ObjectController)","u":"addController(controller.ObjectController)"},{"p":"playground","c":"Playground","l":"addObject(GameObject)","u":"addObject(gameobjects.GameObject)"},{"p":"playground","c":"Playground","l":"addObjectNow(GameObject)","u":"addObjectNow(gameobjects.GameObject)"},{"p":"gameobjects","c":"AnimatedGameobject","l":"AnimatedGameobject(String, Playground, double, double, double, double, double, Animation, double, String)","u":"%3Cinit%3E(java.lang.String,playground.Playground,double,double,double,double,double,playground.Animation,double,java.lang.String)"},{"p":"playground","c":"Animation","l":"Animation(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"rendering","c":"AnimationArtist","l":"AnimationArtist(GameObject, Animation, double, String, double)","u":"%3Cinit%3E(gameobjects.GameObject,playground.Animation,double,java.lang.String,double)"},{"p":"playground","c":"Playground","l":"applyGameLogic()"},{"p":"playground","c":"SpaceInvadersLevel","l":"applyGameLogic()"},{"p":"controller","c":"ObjectController","l":"applySpeedVector()"},{"p":"collider","c":"CircleCollider","l":"checkCollisionCircCirc(Collider)","u":"checkCollisionCircCirc(collider.Collider)"},{"p":"collider","c":"RectCollider","l":"checkCollisionRectCirc(Collider)","u":"checkCollisionRectCirc(collider.Collider)"},{"p":"collider","c":"RectCollider","l":"checkCollisionRectRect(Collider)","u":"checkCollisionRectRect(collider.Collider)"},{"p":"rendering","c":"CircleArtist","l":"CircleArtist(GameObject)","u":"%3Cinit%3E(gameobjects.GameObject)"},{"p":"rendering","c":"CircleArtist","l":"CircleArtist(GameObject, double, Color)","u":"%3Cinit%3E(gameobjects.GameObject,double,java.awt.Color)"},{"p":"collider","c":"CircleCollider","l":"CircleCollider(String, GameObject, double)","u":"%3Cinit%3E(java.lang.String,gameobjects.GameObject,double)"},{"p":"playground","c":"HighscoreManager","l":"closeFile()"},{"p":"playground","c":"Playground","l":"collectObjects(String, boolean)","u":"collectObjects(java.lang.String,boolean)"},{"p":"collider","c":"Collider","l":"Collider(String, GameObject)","u":"%3Cinit%3E(java.lang.String,gameobjects.GameObject)"},{"p":"collider","c":"CircleCollider","l":"collidesWith(Collider)","u":"collidesWith(collider.Collider)"},{"p":"collider","c":"Collider","l":"collidesWith(Collider)","u":"collidesWith(collider.Collider)"},{"p":"collider","c":"RectCollider","l":"collidesWith(Collider)","u":"collidesWith(collider.Collider)"},{"p":"controller","c":"CollisionAwareEgoController","l":"CollisionAwareEgoController(double)","u":"%3Cinit%3E(double)"},{"p":"controller","c":"CollisionAwareEgoController","l":"CollisionAwareEgoController(double, File)","u":"%3Cinit%3E(double,java.io.File)"},{"p":"gameobjects","c":"GameObject","l":"collisionDetection(GameObject)","u":"collisionDetection(gameobjects.GameObject)"},{"p":"playground","c":"Playground","l":"deleteObject(String)","u":"deleteObject(java.lang.String)"},{"p":"playground","c":"Playground","l":"deleteObjectNow(String)","u":"deleteObjectNow(java.lang.String)"},{"p":"gameobjects","c":"GameObject","l":"draw(Graphics2D)","u":"draw(java.awt.Graphics2D)"},{"p":"rendering","c":"AnimationArtist","l":"draw(Graphics2D)","u":"draw(java.awt.Graphics2D)"},{"p":"rendering","c":"Artist","l":"draw(Graphics2D)","u":"draw(java.awt.Graphics2D)"},{"p":"rendering","c":"CircleArtist","l":"draw(Graphics2D)","u":"draw(java.awt.Graphics2D)"},{"p":"rendering","c":"RectArtist","l":"draw(Graphics2D)","u":"draw(java.awt.Graphics2D)"},{"p":"rendering","c":"TextArtist","l":"draw(Graphics2D)","u":"draw(java.awt.Graphics2D)"},{"p":"controller","c":"EgoController","l":"EgoController(double)","u":"%3Cinit%3E(double)"},{"p":"controller","c":"EgoController","l":"EgoController(double, double)","u":"%3Cinit%3E(double,double)"},{"p":"gameobjects","c":"EgoObject","l":"EgoObject(String, Playground, double, double, double, double, double)","u":"%3Cinit%3E(java.lang.String,playground.Playground,double,double,double,double,double)"},{"p":"playground","c":"SpaceInvadersLevel","l":"EGOSPEED"},{"p":"controller","c":"EnemyController","l":"EnemyController()","u":"%3Cinit%3E()"},{"p":"gameobjects","c":"FallingStar","l":"FallingStar(String, Playground, double, double, double, double, Color, double)","u":"%3Cinit%3E(java.lang.String,playground.Playground,double,double,double,double,java.awt.Color,double)"},{"p":"controller","c":"FallingStarController","l":"FallingStarController()","u":"%3Cinit%3E()"},{"p":"playground","c":"Animation","l":"fileList"},{"p":"playground","c":"Playground","l":"FLAGS_ALL"},{"p":"playground","c":"Playground","l":"FLAGS_GLOBAL"},{"p":"playground","c":"Playground","l":"FLAGS_LEVEL"},{"p":"base","c":"GameLoop","l":"GameLoop()","u":"%3Cinit%3E()"},{"p":"gameobjects","c":"GameObject","l":"GameObject(String, Playground, double, double, double, double)","u":"%3Cinit%3E(java.lang.String,playground.Playground,double,double,double,double)"},{"p":"gameobjects","c":"GameObject","l":"GameObject(String, Playground, ObjectController, double, double, double, double)","u":"%3Cinit%3E(java.lang.String,playground.Playground,controller.ObjectController,double,double,double,double)"},{"p":"playground","c":"Playground","l":"gameOver()"},{"p":"playground","c":"SpaceInvadersLevel","l":"gameOver()"},{"p":"ui","c":"GameUI","l":"GameUI(int, int)","u":"%3Cinit%3E(int,int)"},{"p":"gameobjects","c":"AnimatedGameobject","l":"generateColliders()"},{"p":"gameobjects","c":"EgoObject","l":"generateColliders()"},{"p":"gameobjects","c":"GameObject","l":"generateColliders()"},{"p":"gameobjects","c":"RectObject","l":"generateColliders()"},{"p":"gameobjects","c":"TextObject","l":"generateColliders()"},{"p":"ui","c":"GameUI","l":"getCurrentKey()"},{"p":"playground","c":"Animation","l":"getFileList()"},{"p":"gameobjects","c":"GameObject","l":"getGameTime()"},{"p":"playground","c":"Playground","l":"getGameTime()"},{"p":"rendering","c":"Artist","l":"getGameTime()"},{"p":"playground","c":"Playground","l":"getGlobalFlag(String)","u":"getGlobalFlag(java.lang.String)"},{"p":"rendering","c":"AnimationArtist","l":"getH()"},{"p":"gameobjects","c":"RectObject","l":"getHeight()"},{"p":"collider","c":"Collider","l":"getId()"},{"p":"gameobjects","c":"GameObject","l":"getId()"},{"p":"playground","c":"Animation","l":"getImageList()"},{"p":"playground","c":"Playground","l":"getKeyEvents()"},{"p":"ui","c":"GameUI","l":"getKeyEvents()"},{"p":"playground","c":"Playground","l":"getLevelFlag(String)","u":"getLevelFlag(java.lang.String)"},{"p":"playground","c":"Playground","l":"getMouseEvents()"},{"p":"ui","c":"GameUI","l":"getMouseEvents()"},{"p":"ui","c":"GameUI","l":"getNewAction()"},{"p":"playground","c":"Playground","l":"getObject(String)","u":"getObject(java.lang.String)"},{"p":"gameobjects","c":"GameObject","l":"getObjectController()"},{"p":"gameobjects","c":"GameObject","l":"getObjectFlag(String)","u":"getObjectFlag(java.lang.String)"},{"p":"playground","c":"Playground","l":"getOrCreateGlobalFlag(String, Object)","u":"getOrCreateGlobalFlag(java.lang.String,java.lang.Object)"},{"p":"playground","c":"Playground","l":"getOrCreateLevelFlag(String, Object)","u":"getOrCreateLevelFlag(java.lang.String,java.lang.Object)"},{"p":"gameobjects","c":"GameObject","l":"getOrCreateObjectFlag(String, Object)","u":"getOrCreateObjectFlag(java.lang.String,java.lang.Object)"},{"p":"controller","c":"ObjectController","l":"getPlayground()"},{"p":"gameobjects","c":"GameObject","l":"getPlayground()"},{"p":"playground","c":"Animation","l":"getShowtimeList()"},{"p":"playground","c":"Playground","l":"getSizeX()"},{"p":"playground","c":"Playground","l":"getSizeY()"},{"p":"gameobjects","c":"TextObject","l":"getText()"},{"p":"rendering","c":"TextArtist","l":"getText()"},{"p":"rendering","c":"TextArtist","l":"getTextHeight()"},{"p":"rendering","c":"TextArtist","l":"getTextWidth()"},{"p":"controller","c":"ObjectController","l":"getTimestep()"},{"p":"playground","c":"Playground","l":"getTimestep()"},{"p":"controller","c":"ObjectController","l":"getVX()"},{"p":"gameobjects","c":"GameObject","l":"getVX()"},{"p":"rendering","c":"Artist","l":"getVX()"},{"p":"controller","c":"ObjectController","l":"getVY()"},{"p":"gameobjects","c":"GameObject","l":"getVY()"},{"p":"rendering","c":"Artist","l":"getVY()"},{"p":"rendering","c":"AnimationArtist","l":"getW()"},{"p":"gameobjects","c":"RectObject","l":"getWidth()"},{"p":"collider","c":"Collider","l":"getX()"},{"p":"controller","c":"ObjectController","l":"getX()"},{"p":"gameobjects","c":"GameObject","l":"getX()"},{"p":"rendering","c":"Artist","l":"getX()"},{"p":"collider","c":"Collider","l":"getY()"},{"p":"controller","c":"ObjectController","l":"getY()"},{"p":"gameobjects","c":"GameObject","l":"getY()"},{"p":"rendering","c":"Artist","l":"getY()"},{"p":"ui","c":"GameUI","l":"grabFocus()"},{"p":"playground","c":"HighscoreManager","l":"HighscoreManager()","u":"%3Cinit%3E()"},{"p":"collider","c":"Collider","l":"id"},{"p":"gameobjects","c":"GameObject","l":"id"},{"p":"playground","c":"Animation","l":"imageList"},{"p":"gameobjects","c":"GameObject","l":"isActive()"},{"p":"ui","c":"GameUI","l":"isPainting()"},{"p":"playground","c":"Playground","l":"isPaused()"},{"p":"playground","c":"Level1","l":"Level1()","u":"%3Cinit%3E()"},{"p":"playground","c":"Level2","l":"Level2()","u":"%3Cinit%3E()"},{"p":"playground","c":"Level3","l":"Level3()","u":"%3Cinit%3E()"},{"p":"playground","c":"Level4","l":"Level4()","u":"%3Cinit%3E()"},{"p":"playground","c":"Level5","l":"Level5()","u":"%3Cinit%3E()"},{"p":"playground","c":"Level6","l":"Level6()","u":"%3Cinit%3E()"},{"p":"playground","c":"Level7","l":"Level7()","u":"%3Cinit%3E()"},{"p":"playground","c":"LevelBoss","l":"LevelBoss()","u":"%3Cinit%3E()"},{"p":"playground","c":"Playground","l":"levelFinished()"},{"p":"playground","c":"SpaceInvadersLevel","l":"levelFinished()"},{"p":"playground","c":"LevelHitTwice","l":"LevelHitTwice()","u":"%3Cinit%3E()"},{"p":"playground","c":"LevelWithBox","l":"LevelWithBox()","u":"%3Cinit%3E()"},{"p":"controller","c":"LimitedTimeController","l":"LimitedTimeController(double, double)","u":"%3Cinit%3E(double,double)"},{"p":"base","c":"GameLoop","l":"main(String[])","u":"main(java.lang.String[])"},{"p":"base","c":"MultiLevelGame","l":"main(String[])","u":"main(java.lang.String[])"},{"p":"gameobjects","c":"GameObject","l":"MASK"},{"p":"playground","c":"Level4","l":"MAX_HITS"},{"p":"playground","c":"LevelHitTwice","l":"MAX_HITS"},{"p":"controller","c":"MineController","l":"MineController(double)","u":"%3Cinit%3E(double)"},{"p":"base","c":"MultiLevelGame","l":"MultiLevelGame()","u":"%3Cinit%3E()"},{"p":"playground","c":"Music","l":"Music()","u":"%3Cinit%3E()"},{"p":"playground","c":"Music","l":"music(File)","u":"music(java.io.File)"},{"p":"controller","c":"ObjectController","l":"ObjectController()","u":"%3Cinit%3E()"},{"p":"controller","c":"EgoController","l":"onDown(KeyEvent, GameObject)","u":"onDown(java.awt.event.KeyEvent,gameobjects.GameObject)"},{"p":"controller","c":"EgoController","l":"onLeft(KeyEvent, GameObject)","u":"onLeft(java.awt.event.KeyEvent,gameobjects.GameObject)"},{"p":"controller","c":"EgoController","l":"onRight(KeyEvent, GameObject)","u":"onRight(java.awt.event.KeyEvent,gameobjects.GameObject)"},{"p":"controller","c":"CollisionAwareEgoController","l":"onSpace(KeyEvent, GameObject)","u":"onSpace(java.awt.event.KeyEvent,gameobjects.GameObject)"},{"p":"controller","c":"EgoController","l":"onSpace(KeyEvent, GameObject)","u":"onSpace(java.awt.event.KeyEvent,gameobjects.GameObject)"},{"p":"controller","c":"EgoController","l":"onStop(KeyEvent, GameObject)","u":"onStop(java.awt.event.KeyEvent,gameobjects.GameObject)"},{"p":"controller","c":"EgoController","l":"onUp(KeyEvent, GameObject)","u":"onUp(java.awt.event.KeyEvent,gameobjects.GameObject)"},{"p":"playground","c":"Playground","l":"Playground()","u":"%3Cinit%3E()"},{"p":"playground","c":"Playground","l":"preferredSizeX()"},{"p":"playground","c":"SpaceInvadersLevel","l":"preferredSizeX()"},{"p":"playground","c":"Playground","l":"preferredSizeY()"},{"p":"playground","c":"SpaceInvadersLevel","l":"preferredSizeY()"},{"p":"playground","c":"LevelWithBox","l":"prepareLevel(String)","u":"prepareLevel(java.lang.String)"},{"p":"playground","c":"Playground","l":"prepareLevel(String)","u":"prepareLevel(java.lang.String)"},{"p":"playground","c":"SpaceInvadersLevel","l":"prepareLevel(String)","u":"prepareLevel(java.lang.String)"},{"p":"playground","c":"Playground","l":"processKeyEvents(Stack)","u":"processKeyEvents(java.util.Stack)"},{"p":"playground","c":"Playground","l":"processMouseEvents(Stack)","u":"processMouseEvents(java.util.Stack)"},{"p":"gameobjects","c":"GameObject","l":"RADIUS"},{"p":"playground","c":"HighscoreManager","l":"readHSFromFile()"},{"p":"gameobjects","c":"GameObject","l":"RECTANGLE"},{"p":"rendering","c":"RectArtist","l":"RectArtist(GameObject, double, double, Color)","u":"%3Cinit%3E(gameobjects.GameObject,double,double,java.awt.Color)"},{"p":"collider","c":"RectCollider","l":"RectCollider(String, GameObject, double, double)","u":"%3Cinit%3E(java.lang.String,gameobjects.GameObject,double,double)"},{"p":"gameobjects","c":"RectObject","l":"RectObject(String, Playground, double, double, double, double, double, double, Color)","u":"%3Cinit%3E(java.lang.String,playground.Playground,double,double,double,double,double,double,java.awt.Color)"},{"p":"playground","c":"Playground","l":"redraw(Graphics2D)","u":"redraw(java.awt.Graphics2D)"},{"p":"playground","c":"Playground","l":"redrawLevel(Graphics2D)","u":"redrawLevel(java.awt.Graphics2D)"},{"p":"playground","c":"SpaceInvadersLevel","l":"redrawLevel(Graphics2D)","u":"redrawLevel(java.awt.Graphics2D)"},{"p":"ui","c":"GameUI","l":"repaint()"},{"p":"playground","c":"Playground","l":"reset()"},{"p":"ui","c":"GameUI","l":"resetAction()"},{"p":"playground","c":"Playground","l":"resetFlags(int)"},{"p":"controller","c":"CollisionAwareEgoController","l":"restoreDynamicState()"},{"p":"base","c":"GameLoop","l":"runGame(String[])","u":"runGame(java.lang.String[])"},{"p":"playground","c":"SaveGame","l":"save()"},{"p":"controller","c":"CollisionAwareEgoController","l":"saveDynamicState()"},{"p":"playground","c":"SaveGame","l":"SaveGame()","u":"%3Cinit%3E()"},{"p":"gameobjects","c":"GameObject","l":"scol"},{"p":"gameobjects","c":"GameObject","l":"setActive(boolean)"},{"p":"gameobjects","c":"GameObject","l":"setColliders(LinkedList)","u":"setColliders(java.util.LinkedList)"},{"p":"gameobjects","c":"GameObject","l":"setComponentProperty(String, String, Object)","u":"setComponentProperty(java.lang.String,java.lang.String,java.lang.Object)"},{"p":"collider","c":"Collider","l":"setController(ObjectController)","u":"setController(controller.ObjectController)"},{"p":"controller","c":"ObjectController","l":"setDummy(String)","u":"setDummy(java.lang.String)"},{"p":"playground","c":"Playground","l":"setGameTime(double)"},{"p":"playground","c":"Playground","l":"setGlobalFlag(String, Object)","u":"setGlobalFlag(java.lang.String,java.lang.Object)"},{"p":"playground","c":"Playground","l":"setLevelFlag(String, Object)","u":"setLevelFlag(java.lang.String,java.lang.Object)"},{"p":"collider","c":"Collider","l":"setObject(GameObject)","u":"setObject(gameobjects.GameObject)"},{"p":"controller","c":"ObjectController","l":"setObject(GameObject)","u":"setObject(gameobjects.GameObject)"},{"p":"gameobjects","c":"GameObject","l":"setObjectController(ObjectController)","u":"setObjectController(controller.ObjectController)"},{"p":"gameobjects","c":"GameObject","l":"setObjectFlag(String, Object)","u":"setObjectFlag(java.lang.String,java.lang.Object)"},{"p":"collider","c":"Collider","l":"setOffsets(double, double)","u":"setOffsets(double,double)"},{"p":"ui","c":"GameUI","l":"setPainting()"},{"p":"playground","c":"Playground","l":"setPaused(boolean)"},{"p":"collider","c":"Collider","l":"setPlayground(Playground)","u":"setPlayground(playground.Playground)"},{"p":"controller","c":"ObjectController","l":"setPlayground(Playground)","u":"setPlayground(playground.Playground)"},{"p":"gameobjects","c":"GameObject","l":"setPlayground(Playground)","u":"setPlayground(playground.Playground)"},{"p":"ui","c":"GameUI","l":"setPlayground(Playground)","u":"setPlayground(playground.Playground)"},{"p":"gameobjects","c":"TextObject","l":"setText(String)","u":"setText(java.lang.String)"},{"p":"rendering","c":"TextArtist","l":"setText(String)","u":"setText(java.lang.String)"},{"p":"rendering","c":"TextArtist","l":"setTextHeight(double)"},{"p":"rendering","c":"TextArtist","l":"setTextWidth(double)"},{"p":"playground","c":"Playground","l":"setTimestep(double)"},{"p":"controller","c":"ObjectController","l":"setVX(double)"},{"p":"gameobjects","c":"GameObject","l":"setVX(double)"},{"p":"controller","c":"ObjectController","l":"setVY(double)"},{"p":"gameobjects","c":"GameObject","l":"setVY(double)"},{"p":"controller","c":"ObjectController","l":"setX(double)"},{"p":"gameobjects","c":"GameObject","l":"setX(double)"},{"p":"controller","c":"ObjectController","l":"setY(double)"},{"p":"gameobjects","c":"GameObject","l":"setY(double)"},{"p":"playground","c":"SpaceInvadersLevel","l":"SHOTSPEED"},{"p":"playground","c":"Animation","l":"showtimeList"},{"p":"controller","c":"SimpleShotController","l":"SimpleShotController()","u":"%3Cinit%3E()"},{"p":"base","c":"GameLoop","l":"SIZEX"},{"p":"base","c":"GameLoop","l":"SIZEY"},{"p":"playground","c":"SpaceInvadersLevel","l":"SpaceInvadersLevel()","u":"%3Cinit%3E()"},{"p":"playground","c":"SpaceInvadersLevelAua","l":"SpaceInvadersLevelAua()","u":"%3Cinit%3E()"},{"p":"controller","c":"CollisionAwareEgoController","l":"stopObject()"},{"p":"controller","c":"EgoController","l":"stopObject()"},{"p":"rendering","c":"TextArtist","l":"TextArtist(GameObject, String, int, Color)","u":"%3Cinit%3E(gameobjects.GameObject,java.lang.String,int,java.awt.Color)"},{"p":"gameobjects","c":"TextObject","l":"TextObject(String, Playground, double, double, double, double, String, int, Color)","u":"%3Cinit%3E(java.lang.String,playground.Playground,double,double,double,double,java.lang.String,int,java.awt.Color)"},{"p":"playground","c":"Playground","l":"togglePause()"},{"p":"collider","c":"CircleCollider","l":"toString()"},{"p":"collider","c":"Collider","l":"toString()"},{"p":"collider","c":"RectCollider","l":"toString()"},{"p":"controller","c":"EgoController","l":"updateObject()"},{"p":"controller","c":"EnemyController","l":"updateObject()"},{"p":"controller","c":"FallingStarController","l":"updateObject()"},{"p":"controller","c":"LimitedTimeController","l":"updateObject()"},{"p":"controller","c":"MineController","l":"updateObject()"},{"p":"controller","c":"ObjectController","l":"updateObject()"},{"p":"controller","c":"SimpleShotController","l":"updateObject()"},{"p":"controller","c":"ZickZackController","l":"updateObject()"},{"p":"gameobjects","c":"GameObject","l":"updateObject()"},{"p":"playground","c":"Playground","l":"updateObjects()"},{"p":"ui","c":"GameUI","l":"waitWhilePainting()"},{"p":"playground","c":"HighscoreManager","l":"writeHSToFile(Integer, Integer)","u":"writeHSToFile(java.lang.Integer,java.lang.Integer)"},{"p":"controller","c":"ZickZackController","l":"ZickZackController(double, double)","u":"%3Cinit%3E(double,double)"}];updateSearchResults(); \ No newline at end of file +memberSearchIndex = [{"p":"controller","c":"ReboundController","l":"ReboundController()","u":"%3Cinit%3E()"},{"p":"controller","c":"ReboundController","l":"updateObject()"}];updateSearchResults(); \ No newline at end of file diff --git a/spaceinvaders/GameProject/doc/overview-tree.html b/spaceinvaders/GameProject/doc/overview-tree.html index 86b7820..4d94a1f 100644 --- a/spaceinvaders/GameProject/doc/overview-tree.html +++ b/spaceinvaders/GameProject/doc/overview-tree.html @@ -1,11 +1,11 @@ - + Class Hierarchy - + @@ -28,7 +28,6 @@ loadScripts(document, 'script');
@@ -66,79 +59,11 @@ loadScripts(document, 'script'); diff --git a/spaceinvaders/GameProject/doc/package-search-index.js b/spaceinvaders/GameProject/doc/package-search-index.js index f6dca23..1faf515 100644 --- a/spaceinvaders/GameProject/doc/package-search-index.js +++ b/spaceinvaders/GameProject/doc/package-search-index.js @@ -1 +1 @@ -packageSearchIndex = [{"l":"All Packages","u":"allpackages-index.html"},{"l":"base"},{"l":"collider"},{"l":"controller"},{"l":"gameobjects"},{"l":"playground"},{"l":"rendering"},{"l":"ui"}];updateSearchResults(); \ No newline at end of file +packageSearchIndex = [{"l":"All Packages","u":"allpackages-index.html"},{"l":"controller"}];updateSearchResults(); \ No newline at end of file diff --git a/spaceinvaders/GameProject/doc/script.js b/spaceinvaders/GameProject/doc/script.js index 0765364..864989c 100644 --- a/spaceinvaders/GameProject/doc/script.js +++ b/spaceinvaders/GameProject/doc/script.js @@ -1,26 +1,26 @@ /* * Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. - * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. */ var moduleSearchIndex; diff --git a/spaceinvaders/GameProject/doc/search.js b/spaceinvaders/GameProject/doc/search.js index df0e6fb..2246cdd 100644 --- a/spaceinvaders/GameProject/doc/search.js +++ b/spaceinvaders/GameProject/doc/search.js @@ -1,26 +1,26 @@ /* * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved. - * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. */ var noResult = {l: "No results found"}; diff --git a/spaceinvaders/GameProject/doc/tag-search-index.js b/spaceinvaders/GameProject/doc/tag-search-index.js index f2a440c..0367dae 100644 --- a/spaceinvaders/GameProject/doc/tag-search-index.js +++ b/spaceinvaders/GameProject/doc/tag-search-index.js @@ -1 +1 @@ -tagSearchIndex = [{"l":"Constant Field Values","h":"","u":"constant-values.html"}];updateSearchResults(); \ No newline at end of file +tagSearchIndex = [];updateSearchResults(); \ No newline at end of file diff --git a/spaceinvaders/GameProject/doc/type-search-index.js b/spaceinvaders/GameProject/doc/type-search-index.js index 4d5ecb2..74569fd 100644 --- a/spaceinvaders/GameProject/doc/type-search-index.js +++ b/spaceinvaders/GameProject/doc/type-search-index.js @@ -1 +1 @@ -typeSearchIndex = [{"l":"All Classes and Interfaces","u":"allclasses-index.html"},{"p":"gameobjects","l":"AnimatedGameobject"},{"p":"playground","l":"Animation"},{"p":"rendering","l":"AnimationArtist"},{"p":"rendering","l":"Artist"},{"p":"rendering","l":"CircleArtist"},{"p":"collider","l":"CircleCollider"},{"p":"collider","l":"Collider"},{"p":"controller","l":"CollisionAwareEgoController"},{"p":"controller","l":"EgoController"},{"p":"gameobjects","l":"EgoObject"},{"p":"controller","l":"EnemyController"},{"p":"gameobjects","l":"FallingStar"},{"p":"controller","l":"FallingStarController"},{"p":"base","l":"GameLoop"},{"p":"gameobjects","l":"GameObject"},{"p":"ui","l":"GameUI"},{"p":"playground","l":"HighscoreManager"},{"p":"playground","l":"Level1"},{"p":"playground","l":"Level2"},{"p":"playground","l":"Level3"},{"p":"playground","l":"Level4"},{"p":"playground","l":"Level5"},{"p":"playground","l":"Level6"},{"p":"playground","l":"Level7"},{"p":"playground","l":"LevelBoss"},{"p":"playground","l":"LevelHitTwice"},{"p":"playground","l":"LevelWithBox"},{"p":"controller","l":"LimitedTimeController"},{"p":"controller","l":"MineController"},{"p":"base","l":"MultiLevelGame"},{"p":"playground","l":"Music"},{"p":"controller","l":"ObjectController"},{"p":"playground","l":"Playground"},{"p":"rendering","l":"RectArtist"},{"p":"collider","l":"RectCollider"},{"p":"gameobjects","l":"RectObject"},{"p":"playground","l":"SaveGame"},{"p":"controller","l":"SimpleShotController"},{"p":"playground","l":"SpaceInvadersLevel"},{"p":"playground","l":"SpaceInvadersLevelAua"},{"p":"rendering","l":"TextArtist"},{"p":"gameobjects","l":"TextObject"},{"p":"controller","l":"ZickZackController"}];updateSearchResults(); \ No newline at end of file +typeSearchIndex = [{"l":"All Classes and Interfaces","u":"allclasses-index.html"},{"p":"controller","l":"ReboundController"}];updateSearchResults(); \ No newline at end of file diff --git a/spaceinvaders/GameProject/log/log4j.log b/spaceinvaders/GameProject/log/log4j.log index d875e47..7e67825 100644 --- a/spaceinvaders/GameProject/log/log4j.log +++ b/spaceinvaders/GameProject/log/log4j.log @@ -1094,3 +1094,90 @@ 2022-05-18 16:16:35,304 INFO playground.Animation - img added .\video/heart0.png 2022-05-18 16:16:35,307 INFO playground.Animation - img added .\video/heart1.png 2022-05-18 16:16:35,311 INFO playground.SpaceInvadersLevel - HIGHSCORE17200 +2022-05-18 16:26:22,524 INFO base.GameLoop - GUI starts +2022-05-18 16:26:24,250 INFO base.GameLoop - GUI NEW +2022-05-18 16:26:24,250 INFO playground.SpaceInvadersLevel - PREPARE +2022-05-18 16:26:24,303 INFO playground.Animation - img added .\video/sweetAlien0.png +2022-05-18 16:26:24,311 INFO playground.Animation - img added .\video/sweetAlien1.png +2022-05-18 16:26:24,313 INFO playground.Animation - img added .\video/sweetAlien2.png +2022-05-18 16:26:24,317 INFO playground.Animation - img added .\video/sweetAlien3.png +2022-05-18 16:26:24,321 INFO playground.Animation - img added .\video/sweetAlien4.png +2022-05-18 16:26:24,324 INFO playground.Animation - img added .\video/sweetAlien5.png +2022-05-18 16:26:24,327 INFO playground.Animation - img added .\video/sweetAlien6.png +2022-05-18 16:26:24,329 INFO playground.Animation - img added .\video/sweetAlien7.png +2022-05-18 16:26:24,337 INFO playground.Animation - img added .\video/heart0.png +2022-05-18 16:26:24,340 INFO playground.Animation - img added .\video/heart1.png +2022-05-18 16:26:24,344 INFO playground.SpaceInvadersLevel - HIGHSCORE17200 +2022-05-18 16:37:15,550 INFO base.GameLoop - GUI starts +2022-05-18 16:37:17,390 INFO base.GameLoop - GUI NEW +2022-05-18 16:37:17,391 INFO playground.SpaceInvadersLevel - PREPARE +2022-05-18 16:37:17,446 INFO playground.Animation - img added .\video/sweetAlien0.png +2022-05-18 16:37:17,454 INFO playground.Animation - img added .\video/sweetAlien1.png +2022-05-18 16:37:17,457 INFO playground.Animation - img added .\video/sweetAlien2.png +2022-05-18 16:37:17,461 INFO playground.Animation - img added .\video/sweetAlien3.png +2022-05-18 16:37:17,465 INFO playground.Animation - img added .\video/sweetAlien4.png +2022-05-18 16:37:17,470 INFO playground.Animation - img added .\video/sweetAlien5.png +2022-05-18 16:37:17,473 INFO playground.Animation - img added .\video/sweetAlien6.png +2022-05-18 16:37:17,475 INFO playground.Animation - img added .\video/sweetAlien7.png +2022-05-18 16:37:17,483 INFO playground.Animation - img added .\video/heart0.png +2022-05-18 16:37:17,486 INFO playground.Animation - img added .\video/heart1.png +2022-05-18 16:37:17,491 INFO playground.SpaceInvadersLevel - HIGHSCORE17200 +2022-05-18 17:14:06,549 INFO base.GameLoop - GUI starts +2022-05-18 17:14:09,335 INFO base.GameLoop - GUI NEW +2022-05-18 17:14:09,335 INFO playground.SpaceInvadersLevel - PREPARE +2022-05-18 17:14:09,386 INFO playground.Animation - img added .\video/sweetAlien0.png +2022-05-18 17:14:09,393 INFO playground.Animation - img added .\video/sweetAlien1.png +2022-05-18 17:14:09,396 INFO playground.Animation - img added .\video/sweetAlien2.png +2022-05-18 17:14:09,399 INFO playground.Animation - img added .\video/sweetAlien3.png +2022-05-18 17:14:09,403 INFO playground.Animation - img added .\video/sweetAlien4.png +2022-05-18 17:14:09,407 INFO playground.Animation - img added .\video/sweetAlien5.png +2022-05-18 17:14:09,410 INFO playground.Animation - img added .\video/sweetAlien6.png +2022-05-18 17:14:09,412 INFO playground.Animation - img added .\video/sweetAlien7.png +2022-05-18 17:14:09,419 INFO playground.Animation - img added .\video/heart0.png +2022-05-18 17:14:09,422 INFO playground.Animation - img added .\video/heart1.png +2022-05-18 17:14:09,427 INFO playground.SpaceInvadersLevel - HIGHSCORE17200 +2022-05-18 17:14:31,903 INFO base.GameLoop - GUI starts +2022-05-18 17:14:33,672 INFO base.GameLoop - GUI NEW +2022-05-18 17:14:33,673 INFO playground.SpaceInvadersLevel - PREPARE +2022-05-18 17:14:33,726 INFO playground.Animation - img added .\video/sweetAlien0.png +2022-05-18 17:14:33,734 INFO playground.Animation - img added .\video/sweetAlien1.png +2022-05-18 17:14:33,736 INFO playground.Animation - img added .\video/sweetAlien2.png +2022-05-18 17:14:33,740 INFO playground.Animation - img added .\video/sweetAlien3.png +2022-05-18 17:14:33,744 INFO playground.Animation - img added .\video/sweetAlien4.png +2022-05-18 17:14:33,748 INFO playground.Animation - img added .\video/sweetAlien5.png +2022-05-18 17:14:33,751 INFO playground.Animation - img added .\video/sweetAlien6.png +2022-05-18 17:14:33,753 INFO playground.Animation - img added .\video/sweetAlien7.png +2022-05-18 17:14:33,761 INFO playground.Animation - img added .\video/heart0.png +2022-05-18 17:14:33,764 INFO playground.Animation - img added .\video/heart1.png +2022-05-18 17:14:33,768 INFO playground.SpaceInvadersLevel - HIGHSCORE17200 +2022-05-18 17:19:18,165 INFO base.GameLoop - GUI starts +2022-05-18 17:19:20,583 INFO base.GameLoop - GUI NEW +2022-05-18 17:19:20,583 INFO playground.SpaceInvadersLevel - PREPARE +2022-05-18 17:19:20,637 INFO playground.Animation - img added .\video/sweetAlien0.png +2022-05-18 17:19:20,645 INFO playground.Animation - img added .\video/sweetAlien1.png +2022-05-18 17:19:20,647 INFO playground.Animation - img added .\video/sweetAlien2.png +2022-05-18 17:19:20,651 INFO playground.Animation - img added .\video/sweetAlien3.png +2022-05-18 17:19:20,655 INFO playground.Animation - img added .\video/sweetAlien4.png +2022-05-18 17:19:20,659 INFO playground.Animation - img added .\video/sweetAlien5.png +2022-05-18 17:19:20,662 INFO playground.Animation - img added .\video/sweetAlien6.png +2022-05-18 17:19:20,665 INFO playground.Animation - img added .\video/sweetAlien7.png +2022-05-18 17:19:20,672 INFO playground.Animation - img added .\video/heart0.png +2022-05-18 17:19:20,675 INFO playground.Animation - img added .\video/heart1.png +2022-05-18 17:19:20,679 INFO playground.SpaceInvadersLevel - HIGHSCORE17200 +2022-05-18 17:19:58,938 INFO base.GameLoop - GUI starts +2022-05-18 17:20:00,839 INFO base.GameLoop - GUI NEW +2022-05-18 17:20:00,839 INFO playground.SpaceInvadersLevel - PREPARE +2022-05-18 17:20:00,891 INFO playground.Animation - img added .\video/sweetAlien0.png +2022-05-18 17:20:00,899 INFO playground.Animation - img added .\video/sweetAlien1.png +2022-05-18 17:20:00,902 INFO playground.Animation - img added .\video/sweetAlien2.png +2022-05-18 17:20:00,905 INFO playground.Animation - img added .\video/sweetAlien3.png +2022-05-18 17:20:00,910 INFO playground.Animation - img added .\video/sweetAlien4.png +2022-05-18 17:20:00,914 INFO playground.Animation - img added .\video/sweetAlien5.png +2022-05-18 17:20:00,916 INFO playground.Animation - img added .\video/sweetAlien6.png +2022-05-18 17:20:00,919 INFO playground.Animation - img added .\video/sweetAlien7.png +2022-05-18 17:20:00,926 INFO playground.Animation - img added .\video/heart0.png +2022-05-18 17:20:00,929 INFO playground.Animation - img added .\video/heart1.png +2022-05-18 17:20:00,934 INFO playground.SpaceInvadersLevel - HIGHSCORE17200 +2022-05-18 17:20:56,882 INFO playground.SpaceInvadersLevel - no enemies left, level done. +2022-05-18 17:20:56,883 INFO base.GameLoop - reached end of levels +2022-05-18 17:20:56,883 INFO base.GameLoop - Game ends. Bye. diff --git a/spaceinvaders/GameProject/src/controller/ReboundController.java b/spaceinvaders/GameProject/src/controller/ReboundController.java new file mode 100644 index 0000000..671a489 --- /dev/null +++ b/spaceinvaders/GameProject/src/controller/ReboundController.java @@ -0,0 +1,17 @@ +package controller; + +public class ReboundController extends ObjectController { + + @Override + public void updateObject() { + // TODO Auto-generated method stub + if(this.getX()<30 || this.getX()>670) { + this.setVX(this.getVX()* -1); + } + if(this.getY()<30 || this.getY()>670) { + this.setVY(this.getVY()* -1); + } + this.applySpeedVector(); + } + +} diff --git a/spaceinvaders/GameProject/src/playground/LevelMovingObjects.java b/spaceinvaders/GameProject/src/playground/LevelMovingObjects.java index dd93acf..fc84666 100644 --- a/spaceinvaders/GameProject/src/playground/LevelMovingObjects.java +++ b/spaceinvaders/GameProject/src/playground/LevelMovingObjects.java @@ -1,12 +1,25 @@ package playground; +import java.awt.Color; +import gameobjects.*; +import controller.*; /** This level adds two distracting objects to the canvas that cannot collide but bounce around all the time. */ public class LevelMovingObjects extends SpaceInvadersLevel { // TODO your code here + + @Override + public void prepareLevel(String id) { + super.prepareLevel(id); + RectObject blueBox = new RectObject("BlueBox", this, 300, 300, 170, 70, 30, 30, Color.BLUE); + this.addObject(blueBox); + ReboundController boxControl = new ReboundController(); + blueBox.addController(boxControl); + } + /** "Moving Objects Level!" is the message.