Created
September 29, 2020 11:57
-
-
Save hafsasheik/2d760d26659abd9214e6b172e5824b00 to your computer and use it in GitHub Desktop.
2d game
This file contains hidden or 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
| using System; | |
| using System.Collections.Generic; | |
| using System.Diagnostics; | |
| namespace _2dgame | |
| { | |
| class Program | |
| { | |
| class Entitet | |
| { | |
| public char Kropp { get; set; } | |
| //konstruktor | |
| public Entitet(char kropp) | |
| { | |
| Kropp = kropp; | |
| } | |
| class Föremål : Entitet | |
| { | |
| //Konstructor | |
| public Föremål(char kropp) : base(kropp) | |
| { | |
| } | |
| } | |
| class Varelse : Entitet | |
| { | |
| //prop | |
| public int Strength { get; set; } | |
| public int Life { get; set; } | |
| public int Happiness { get; set; } | |
| //kontruktor | |
| public Varelse(char kropp, int strength, int life, int happiness) : base(kropp) | |
| { | |
| Strength = strength; | |
| Life = life; | |
| Happiness = happiness; | |
| } | |
| } | |
| class Spelare : Varelse | |
| { | |
| //prop | |
| public int Stamina { get; set; } | |
| //konstruktor | |
| public Spelare(char kropp, int life, int strength, int happiness, int stamina) : base(kropp, life, strength, happiness) | |
| { | |
| Stamina = stamina; | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment