-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Philip M
authored and
Philip M
committed
Aug 1, 2018
1 parent
820a064
commit b6b5333
Showing
10 changed files
with
44 additions
and
27 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,36 @@ | ||
|
||
public class Repo | ||
{ | ||
public int blink(Eyes eyes, int counter) | ||
public void blink(Eyes eyes, Frame frame) | ||
{ | ||
counter++; | ||
if (eyes.isBlink() && counter > 100) { | ||
eyes.setBlink(false); | ||
counter = 0; | ||
} else if (counter > 1100) { | ||
int counter = frame.getCounter(); | ||
|
||
if (!eyes.isBlink() && ((counter % 1100) == 0)) | ||
{ | ||
eyes.setBlink(true); | ||
counter = 0; | ||
eyes.setColor(0,0,0); | ||
|
||
try { | ||
Thread.sleep(300); | ||
} catch (InterruptedException e) { | ||
e.printStackTrace(); | ||
} | ||
} | ||
else if (counter > 1100) | ||
{ | ||
eyes.setBlink(false); | ||
} | ||
|
||
return counter; | ||
counter++; | ||
frame.setCounter(counter); | ||
} | ||
|
||
public void angry(Frame frame, Eyes eyes) | ||
{ | ||
if(frame.isClick()) | ||
{ | ||
eyes.setColor(255,30,30); | ||
} else { | ||
eyes.setColor(10, 200, 255); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters