Skip to content

Commit

Permalink
Zafeer documentation update
Browse files Browse the repository at this point in the history
  • Loading branch information
ZafeerA123 committed Nov 1, 2023
1 parent 6763e90 commit 8682096
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion _includes/Documentation_basics.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<td><img src="{{site.baseurl}}//images/lol_logo.png" height="60" title="Frontend" alt=""></td>
<td><a href="{{site.baseurl}}/projectSummary/anatomy">Home</a></td>
<td><a href="{{site.baseurl}}/(EnterURL)">Struggles</a></td>
<td><a href="{{site.baseurl}}/(EnterURL)">Progress</a></td>
<td><a href="{{site.baseurl}}/progress">Progress</a></td>
<td><a href="{{site.baseurl}}/projectSummary/Trystan">Trystan</a></td>
<td><a href="{{site.baseurl}}/Documentation/Zafeer">Zafeer</a></td>
<td><a href="{{site.baseurl}}/projectSummary/Sean">Sean</a></td>
Expand Down
15 changes: 11 additions & 4 deletions _posts/2023-10-19-OverLap1.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,19 +88,26 @@ This code takes the two objects (character and box) from [The original code](htt
## Ekey
First it creates an object called ekey
Interaction with Ekey:
There is an event listener added to the window for the 'keydown' event. When the 'E' key is pressed (key code 69), it checks for the overlap between the main character and a BoxObject1 (Using [Collision Code](http://127.0.0.1:4200/Group//c4.1/2023/10/19/OverLap1.html)). If an overlap is detected, it alters the scale of boxObject2, making it disappear.
There is an event listener added to the window for the 'keydown' event. When the 'E' key is pressed (key code 69), it checks for the overlap between the main character and a BoxObject1 (Using [Collision Code](http://127.0.0.1:4200/Group//c4.1/2023/10/19/OverLap1.html)). If an overlap is detected, it alters the scale of the boxes, making it disappear.

Condition for Displaying the Ekey Sprite:

When the main character overlaps with specific objects (boxObject1 and/or boxObject2), a variable named showEKeySprite is set to true.
Frame Update Function (frame() function):
When the main character overlaps with the boxes, a variable named showEKeySprite is set to true.
Frame Update Function:
- If this is true, Ekey sprite animation is updated.
- The Ekey sprite is drawn on the canvas using Ekey.draw()
- Within the frame() function, the code updates the Ekey sprite animation at a set frame rate using the condition currentFrame % Math.round(fps/2)==0.
- This calculation is used to control the frequency of sprite updates, giving the appearance of animation.


## Drawings I made used in game
![office](/Group/images/Game/officeroom4.png)
![Elevator](/Group/images/Game/Elevator_Up.png)
![EKeySprite](/Group/images/Game/EKeySprite.png)


## Drawings I made not used in game
![Floating_Bed](/Group/images/Game/floatingBed-sprite.png)
![Candle_Sprite](/Group/images/Game/candle-sprite.png)



Expand Down
2 changes: 0 additions & 2 deletions _posts/2023-10-26-SeanProgress.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ var pos = myCharacter.onFrame(fps); //update frame, and get position
This checks where the character is, and if they are too far left (if (pos[0]) < -32) then they cannot walk any further. Same for moving up past the floor line, (if (pos[1] < 240)) then they can only walk left, right, or down. [1] means y axis, [0] means x axis.

# Drawings
![office](/Group/images/Game/officeroom4.png)

![bedroom](/Group/images/Game/room1update.png)

![rain on window](/Group/images/Game/window-rain-sprite.png)
Expand Down
Binary file added images/Game/Elevator_Up.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8682096

Please sign in to comment.