Last active
May 2, 2019 01:52
-
-
Save SenpaiRar/8aa165f6f9c0108f983c1e40990e6aa7 to your computer and use it in GitHub Desktop.
1. This was the old implementation of the modifier system
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
public void CheckStatsForDebuffs() // | |
{ | |
Sluggishness(); | |
ShortSightedness(); | |
} | |
//Debuffs and Buffs | |
private void Sluggishness() //Every modifier was a function in the Player_Manager Script | |
{ | |
if (current_Hunger_Level < 90) //Inside every function they had their threshold check, in this case checking if | |
{ //if hunger is below 90 | |
current_Speed = Max_Speed*.5f; | |
} | |
else | |
{ | |
current_Speed = Max_Speed; | |
} | |
} | |
private void ShortSightedness() //This is another modifier | |
{ | |
if (current_Water_Level < 90) | |
{ | |
Player_Camera.orthographicSize = 2.5f; | |
} | |
else | |
{ | |
Player_Camera.orthographicSize = 5; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment