KuSpa / RockRaiders

👨‍🏭 Clone of an awesome same named game
GNU General Public License v3.0
18 stars 1 forks source link

base #17

Closed KuSpa closed 5 years ago

KuSpa commented 5 years ago

create a base:

KuSpa commented 5 years ago

I don't have enough knowledge of the game to implement this(buildings) properly: I can imagine 2 ways of ownership and relations:

first:

pub enum Tile {
    Ground { concealed: bool, buildings: Vec<Box<Building>>},
    ...
}

pros:

cons:

second:

struct Base {position: &Entity/Parent/Tile/..., ...} 

and add it as child to the Ground Entity

pros:

cons:

KuSpa commented 5 years ago

I prefer the second approach.

karyon commented 5 years ago

yeah, second approach.