Update prefabs
This commit is contained in:
parent
f0160aa811
commit
bab35ae71f
10 changed files with 22 additions and 15 deletions
|
@ -96,8 +96,8 @@ MonoBehaviour:
|
|||
overlappable: 1
|
||||
hpMax: 1
|
||||
hp: 1
|
||||
hpChange: -1
|
||||
maxHpChange: -1
|
||||
hpChange: -2
|
||||
maxHpChange: -2
|
||||
damage: 3
|
||||
attackAnimation: {fileID: 5896060810164205279, guid: 602b69921902efc44ab8a008655b6574,
|
||||
type: 3}
|
||||
|
|
|
@ -96,8 +96,8 @@ MonoBehaviour:
|
|||
overlappable: 1
|
||||
hpMax: 1
|
||||
hp: 0
|
||||
hpChange: -1
|
||||
maxHpChange: -1
|
||||
hpChange: -6
|
||||
maxHpChange: -6
|
||||
damage: 5
|
||||
attackAnimation: {fileID: 5896060810164205279, guid: 602b69921902efc44ab8a008655b6574,
|
||||
type: 3}
|
||||
|
|
|
@ -15,9 +15,8 @@ public class EntityItemShopSword : EntityItemShop {
|
|||
|
||||
protected override void OnPurchase(EntityPlayer player) {
|
||||
Destroy(player.GetComponent<PlayerAttack>());
|
||||
player.gameObject.AddComponent<PlayerAttackMelee>();
|
||||
PlayerAttackMelee pam = player.GetComponent<PlayerAttackMelee>();
|
||||
PlayerAttackMelee pam = player.gameObject.AddComponent<PlayerAttackMelee>();
|
||||
pam.damage = this.damage;
|
||||
pam.attackAnimation = attackAnimation;
|
||||
pam.attackAnimation = this.attackAnimation;
|
||||
}
|
||||
}
|
|
@ -7,7 +7,7 @@ public class EntityMonster : Entity
|
|||
public string monsterName;
|
||||
|
||||
public virtual void OnTurn() {
|
||||
Debug.LogWarning("OnTurn() not overridden");
|
||||
//Do nothing.
|
||||
}
|
||||
|
||||
public override void Die() {
|
||||
|
|
|
@ -131,7 +131,9 @@ public class Map : MonoBehaviour
|
|||
public bool CanMoveTo(Vector2Int position)
|
||||
{
|
||||
try {
|
||||
bool walkable = GetTile(position).walkable;
|
||||
MapTile tile = GetTile(position);
|
||||
if(tile == null) return false;
|
||||
bool walkable = tile.walkable;
|
||||
List<Entity> entities = turnHandler.GetEntitiesAtPosition(position);
|
||||
bool free = true;
|
||||
foreach(Entity entity in entities) {
|
||||
|
@ -257,6 +259,9 @@ public class Map : MonoBehaviour
|
|||
for(int i = 0; i < enemiesToSpawn; i++) {
|
||||
MapRoom room = rooms[Random.Range(0, rooms.Count)];
|
||||
Vector2Int point = room.RandomPoint();
|
||||
if(turnHandler.GetEntitiesAtPosition(point).Count > 0) {
|
||||
continue;
|
||||
}
|
||||
GameObject enemyPrefab = enemyPrefabs[Random.Range(0, enemyPrefabs.Count)];
|
||||
GameObject enemyObject = Instantiate(enemyPrefab, turnHandler.transform);
|
||||
enemyObject.name = "Enemy " + i.ToString();
|
||||
|
@ -268,6 +273,9 @@ public class Map : MonoBehaviour
|
|||
for(int i = 0; i < curiositiesToSpawn; i++) {
|
||||
MapRoom room = rooms[Random.Range(0, rooms.Count)];
|
||||
Vector2Int point = room.RandomPoint();
|
||||
if(turnHandler.GetEntitiesAtPosition(point).Count > 0) {
|
||||
continue;
|
||||
}
|
||||
GameObject curiosityPrefab = curiositiesPrefabs[Random.Range(0, curiositiesPrefabs.Count)];
|
||||
GameObject curiosityObject = Instantiate(curiosityPrefab, turnHandler.transform);
|
||||
curiosityObject.name = "Curiosity " + i.ToString();
|
||||
|
|
|
@ -97,7 +97,7 @@ TextureImporter:
|
|||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: da5d40c84f8595f47b80dcea5d2deb3a
|
||||
spriteID: 3e6eb75314db5e244bebb22f21c94026
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
|
|
|
@ -97,7 +97,7 @@ TextureImporter:
|
|||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: b492c21463e3a0f4a9b0be683bd11dda
|
||||
spriteID: 6be7daae85043be438bbec5cd6228385
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
|
|
|
@ -97,7 +97,7 @@ TextureImporter:
|
|||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 7c02f5004020e06428309e8025378000
|
||||
spriteID: 386bca1aff16bf940a124f9e4fd86f4b
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
|
|
|
@ -97,7 +97,7 @@ TextureImporter:
|
|||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 9f0d734ca5077c34f8b6bfb253e68903
|
||||
spriteID: 7021a274552590543af602108d3f2751
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
|
|
|
@ -97,7 +97,7 @@ TextureImporter:
|
|||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 554f6d8e091900346aa7a07426a523ee
|
||||
spriteID: ac8a71570b1ff934596f7800b57ecfd2
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
|
|
Loading…
Reference in a new issue