Made stronger bugs
This commit is contained in:
parent
72dc40f3a5
commit
024ecdb676
7 changed files with 45 additions and 11 deletions
|
@ -11,6 +11,21 @@ Prefab:
|
|||
m_ParentPrefab: {fileID: 0}
|
||||
m_RootGameObject: {fileID: 1887677565572348}
|
||||
m_IsPrefabParent: 1
|
||||
--- !u!1 &1259125736160938
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 4528190223728408}
|
||||
m_Layer: 9
|
||||
m_Name: bulletspawn
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!1 &1310248020783766
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 1
|
||||
|
@ -87,6 +102,19 @@ Transform:
|
|||
m_Father: {fileID: 4665188581213052}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!4 &4528190223728408
|
||||
Transform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1259125736160938}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0.319, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 4665188581213052}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!4 &4665188581213052
|
||||
Transform:
|
||||
m_ObjectHideFlags: 1
|
||||
|
@ -98,6 +126,7 @@ Transform:
|
|||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 4193287044024648}
|
||||
- {fileID: 4528190223728408}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
|
@ -151,6 +180,8 @@ MonoBehaviour:
|
|||
rotationSpeed: 1
|
||||
victim: {fileID: 0}
|
||||
body: {fileID: 50033980456084712}
|
||||
bulletSpawn: {fileID: 4528190223728408}
|
||||
bullet: {fileID: 1379543051791382, guid: c6c321ecc6516374781405a54c1fa6a7, type: 2}
|
||||
--- !u!212 &212750371912380942
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 1
|
||||
|
|
|
@ -623,11 +623,6 @@ Prefab:
|
|||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 60772848946696534, guid: 3d1911457c1e44f53b6b4044334db52f,
|
||||
type: 2}
|
||||
propertyPath: m_Enabled
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 100100000, guid: 3d1911457c1e44f53b6b4044334db52f, type: 2}
|
||||
m_IsPrefabParent: 0
|
||||
|
|
|
@ -26,8 +26,10 @@ namespace Assets.Scripts.Entities.Attack {
|
|||
}
|
||||
|
||||
public void Attack() {
|
||||
if ( bulletPrefab == null )
|
||||
if ( bulletPrefab == null ) {
|
||||
Debug.Log("SingleShot: No Prefab defined for Bullet!");
|
||||
return;
|
||||
}
|
||||
GameObject b = GameObject.Instantiate(bulletPrefab);
|
||||
b.transform.rotation = spawn.rotation;
|
||||
b.transform.position = spawn.position;
|
||||
|
|
|
@ -6,13 +6,20 @@ using Assets.Scripts.Entities.Attack;
|
|||
namespace Assets.Scripts.Entities {
|
||||
|
||||
public class Bug : Enemy {
|
||||
[SerializeField]
|
||||
private Transform bulletSpawn;
|
||||
[SerializeField]
|
||||
private GameObject bullet;
|
||||
|
||||
public Bug() : base(15) {
|
||||
|
||||
}
|
||||
|
||||
private void Start() {
|
||||
SetAttack(new MeleeAttack(this.gameObject));
|
||||
SingleShot s = new SingleShot(this.gameObject);
|
||||
s.SetPrefab(bullet);
|
||||
s.SetSpawn(bulletSpawn);
|
||||
SetAttack(s);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,8 +7,8 @@ public class Player : Mob {
|
|||
private GameObject bulletPrefab;
|
||||
[SerializeField]
|
||||
Transform bulletSpawn;
|
||||
[SerializeField]
|
||||
private int carDamage = 5;
|
||||
//[SerializeField]
|
||||
//private int carDamage = 5;
|
||||
|
||||
private SingleShot singleShot;
|
||||
private GatlingGun ggun;
|
||||
|
|
|
@ -135,7 +135,7 @@ public class DungeonGenerator {
|
|||
}
|
||||
allDoors.UnionWith(r.AllDoors());
|
||||
foreach ( Vector2Int v in r.AllDoors() ) {
|
||||
Debug.Log("Door: " + v);
|
||||
//Debug.Log("Door: " + v);
|
||||
if ( !r.bounds.Contains(v) )
|
||||
throw new NotSupportedException("This is a bug where doors land in the wrong room. It should have been fixed.");
|
||||
else
|
||||
|
|
|
@ -194,7 +194,6 @@ public class GenerationProcessor {
|
|||
return 90;
|
||||
toCheck = position + new Vector2Int(1, 0);
|
||||
return 0;
|
||||
break;
|
||||
case ExtendedTileType.DoorInner:
|
||||
Vector2Int toCheckD = position + new Vector2Int(0, -1);
|
||||
if(tiles.ContainsKey(toCheckD) && tiles[toCheckD].type == Room.TileType.DOOR)
|
||||
|
|
Loading…
Add table
Reference in a new issue