successfully added card snapping
This commit is contained in:
@ -19,29 +19,29 @@ class World():
|
||||
# construct elements arround the playerfield
|
||||
# Todo add lifepoint label for player and enemy and make them scriptable
|
||||
pVector = pygame.Vector2((self.__cardOffset + ((self.__cardWidth + 10) * 0)), 15)
|
||||
self.__boardFields.append(BoardField("EnemyDeck", "Deck", pVector, (self.__cardWidth, self.__cardHeight), (0,255,0)))
|
||||
self.__boardFields.append(BoardField("EnemyDeck", "Enemy", "Deck", pVector, (self.__cardWidth, self.__cardHeight), (0,255,0)))
|
||||
|
||||
pVector = pygame.Vector2((self.__cardOffset + ((self.__cardWidth + 10) * 0)), (self.__cardHeight + 25))
|
||||
self.__boardFields.append(BoardField("EnemyGraveyard", "Grave", pVector, (self.__cardWidth, self.__cardHeight), (0,255,0)))
|
||||
self.__boardFields.append(BoardField("EnemyGraveyard", "Enemy", "Grave", pVector, (self.__cardWidth, self.__cardHeight), (0,255,0)))
|
||||
|
||||
pVector = pygame.Vector2((self.__cardOffset + ((self.__cardWidth + 10) * 5)), ((2 * self.__cardHeight) + 60))
|
||||
self.__boardFields.append(BoardField("PlayerDeck", "Deck", pVector, (self.__cardWidth, self.__cardHeight), (255,0,0)))
|
||||
self.__boardFields.append(BoardField("PlayerDeck", "Player", "Deck", pVector, (self.__cardWidth, self.__cardHeight), (255,0,0)))
|
||||
|
||||
pVector = pygame.Vector2((self.__cardOffset + ((self.__cardWidth + 10) * 5)), ((2 * self.__cardHeight) + self.__cardHeight + 70))
|
||||
self.__boardFields.append(BoardField("PlayerGraveyard", "Grave", pVector, (self.__cardWidth, self.__cardHeight), (255,0,0)))
|
||||
self.__boardFields.append(BoardField("PlayerGraveyard", "Player", "Grave", pVector, (self.__cardWidth, self.__cardHeight), (255,0,0)))
|
||||
|
||||
for i in range(5):
|
||||
pVector = pygame.Vector2((self.__cardOffset + ((self.__cardWidth + 10) * i)), ((2 * self.__cardHeight) + 60))
|
||||
self.__boardFields.append(BoardField("PlayerMonsterField-"+str(i),"MonsterField",pVector,(self.__cardWidth, self.__cardHeight),(255,255,255)))
|
||||
self.__boardFields.append(BoardField("PlayerMonsterField-"+str(i), "Player", "MonsterField",pVector,(self.__cardWidth, self.__cardHeight),(255,255,255)))
|
||||
|
||||
pVector = pygame.Vector2((self.__cardOffset + ((self.__cardWidth + 10) * i)), ((2 * self.__cardHeight) + self.__cardHeight + 70))
|
||||
self.__boardFields.append(BoardField("PlayerMonsterField-"+str(i), "EffectField", pVector, (self.__cardWidth, self.__cardHeight), (255,255,255)))
|
||||
self.__boardFields.append(BoardField("PlayerMonsterField-"+str(i), "Player", "EffectField", pVector, (self.__cardWidth, self.__cardHeight), (255,255,255)))
|
||||
|
||||
pVector = pygame.Vector2((self.__cardOffset + ((self.__cardWidth + 10) * (i+1)), 15), (self.__cardWidth, self.__cardHeight))
|
||||
self.__boardFields.append(BoardField("EnemyMonsterField-"+str(i), "MonsterField", pVector, (self.__cardWidth, self.__cardHeight), (255,255,255)))
|
||||
self.__boardFields.append(BoardField("EnemyMonsterField-"+str(i), "Enemy", "MonsterField", pVector, (self.__cardWidth, self.__cardHeight), (255,255,255)))
|
||||
|
||||
pVector = pygame.Vector2((self.__cardOffset + ((self.__cardWidth + 10) * (i+1))), (self.__cardHeight + 25))
|
||||
self.__boardFields.append(BoardField("EnemySpellTrapField-"+str(i), "EffectField", pVector, (self.__cardWidth, self.__cardHeight), (255,255,255)))
|
||||
self.__boardFields.append(BoardField("EnemySpellTrapField-"+str(i), "Enemy", "EffectField", pVector, (self.__cardWidth, self.__cardHeight), (255,255,255)))
|
||||
|
||||
def getBoardFields(self) -> list:
|
||||
return self.__boardFields
|
||||
|
Reference in New Issue
Block a user