-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
resource management overhaul (resources are now saved in a game entity) capability to save maps respawning wildlife and ore workers build houses game starts with one worker instead of house
- Loading branch information
Showing
19 changed files
with
351 additions
and
154 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
|
||
echo "for setup, please enter your sudo passwort:" | ||
sudo -s | ||
echo "making startfile executable" | ||
sudo chmod u+r start.sh | ||
echo "adding Accord library" | ||
sudo dotnet add package Accord | ||
echo "install xterm for terminal resizing" | ||
sudo apt-get install xterm | ||
echo "cleaning up" | ||
sudo apt autoremove | ||
./start.sh |
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
public abstract class Entity{ | ||
protected TIM.main game = null!; | ||
|
||
public abstract bool createByPlayer{get;} //can the entity be created by the player directly | ||
|
||
public abstract bool controlledByPlayer{get;} // can the player controll the entity | ||
public abstract char mapChar{get;} //character which will represent the entity on the map | ||
public abstract int mapColor{get;} //color in which the entity will be drawn on the map | ||
|
||
public Position position{get;set;} = null!; | ||
|
||
//setup function, set position ect. | ||
public virtual void setup(string input, TIM.main game){ | ||
this.game = game; | ||
this.position= new Position(Math.Min(int.Parse(input.Split(",")[0]),game.mapsize.X),Math.Min(int.Parse(input.Split(",")[1]),game.mapsize.Y)); | ||
} | ||
|
||
// setup for spawning entities at start of game | ||
public virtual void autoSetup(Position pos, TIM.main game){ | ||
this.game = game; | ||
this.position = pos; | ||
} | ||
|
||
// prints coordinates of position | ||
public void printPosition(TIM.main game){ | ||
Console.WriteLine("{0}",position); | ||
} | ||
} |
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
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
Oops, something went wrong.