Merge branch 'master' of https://git.steelants.cz/PragueGameJam/GlobalGameJame
This commit is contained in:
commit
b7a73a3bba
BIN
Assets/Models/mollo.blend
Normal file
BIN
Assets/Models/mollo.blend
Normal file
Binary file not shown.
@ -7,6 +7,11 @@ public class SpawnManager : MonoBehaviour
|
||||
|
||||
public List<GameObject> enemyList = new List<GameObject>();
|
||||
public List<Transform> spawnPoints = new List<Transform>();
|
||||
public int enemyNumber = 10;
|
||||
public GameObject Sun = new GameObject();
|
||||
|
||||
bool night = false;
|
||||
bool alreadySpawn = false;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
@ -17,6 +22,46 @@ public class SpawnManager : MonoBehaviour
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
float sunRotationX = Sun.transform.localEulerAngles.x;
|
||||
sunRotationX = (sunRotationX > 180) ? sunRotationX - 360 : sunRotationX;
|
||||
|
||||
Debug.Log(sunRotationX.ToString());
|
||||
if (sunRotationX < 0)
|
||||
{
|
||||
Debug.Log("It is a Night");
|
||||
night = true;
|
||||
} else {
|
||||
Debug.Log("It is a Day");
|
||||
night = false;
|
||||
}
|
||||
|
||||
|
||||
if (!night)
|
||||
{
|
||||
alreadySpawn = false;
|
||||
}
|
||||
|
||||
if (!alreadySpawn && night)
|
||||
{
|
||||
for (int i = 0; i < enemyNumber; i++)
|
||||
{
|
||||
int randomSpawnPoint = Random.Range(0, (spawnPoints.Count - 1));
|
||||
int random = Random.Range(0, (enemyList.Count - 1));
|
||||
GameObject randomSpawnPointGO = spawnPoints[randomSpawnPoint].gameObject;
|
||||
|
||||
Instantiate(enemyList[random], new Vector3(randomSpawnPointGO.transform.position.x, randomSpawnPointGO.transform.position.y, randomSpawnPointGO.transform.position.z), Quaternion.identity);
|
||||
alreadySpawn = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static float Clamp0360(float eulerAngles)
|
||||
{
|
||||
float result = eulerAngles - Mathf.CeilToInt(eulerAngles / 360f) * 360f;
|
||||
if (result < 0)
|
||||
{
|
||||
result += 360f;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
BIN
Assets/Sprites/Icons/Hammer.png
Normal file
BIN
Assets/Sprites/Icons/Hammer.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 26 KiB |
91
Assets/Sprites/Icons/Hammer.png.meta
Normal file
91
Assets/Sprites/Icons/Hammer.png.meta
Normal file
@ -0,0 +1,91 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d55b404a7fd26744a9731469621f0035
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 10
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: -1
|
||||
aniso: -1
|
||||
mipBias: -100
|
||||
wrapU: -1
|
||||
wrapV: -1
|
||||
wrapW: -1
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Sprites/Icons/Shotgun.png
Normal file
BIN
Assets/Sprites/Icons/Shotgun.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 32 KiB |
91
Assets/Sprites/Icons/Shotgun.png.meta
Normal file
91
Assets/Sprites/Icons/Shotgun.png.meta
Normal file
@ -0,0 +1,91 @@
|
||||
fileFormatVersion: 2
|
||||
guid: adad66208e188914d9729f7af2614b19
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 10
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: -1
|
||||
aniso: -1
|
||||
mipBias: -100
|
||||
wrapU: -1
|
||||
wrapV: -1
|
||||
wrapW: -1
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Reference in New Issue
Block a user