feat: spawned roses variation

This commit is contained in:
Gerard Gascón 2024-04-20 12:39:45 +02:00
parent 2cddb7a7b9
commit c24e9d11cf
8 changed files with 138 additions and 33 deletions

View file

@ -98,3 +98,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
sprite: {fileID: 8356824105892962927}
randomSprites:
- {fileID: 21300000, guid: 95cc449131190084689c7555e791f959, type: 3}
- {fileID: 21300000, guid: 623c2050f13889e4fa065a0f5ed3d46b, type: 3}

View file

@ -24,7 +24,7 @@ namespace Presenter {
_onInputReceived.OnInputReceived();
if (CanSpawn) {
if(_score.Value > Score.InitialRosesThreshold)
if(_score.Roses > Score.InitialRosesThreshold)
_spawner.SpawnRose();
else
_spawner.SpawnInitialRose();

View file

@ -5,9 +5,13 @@ using Random = UnityEngine.Random;
namespace View.Scene {
public class GardenFlower : MonoBehaviour {
[SerializeField] private SpriteRenderer sprite;
[SerializeField] private Sprite[] randomSprites;
private static readonly int WindOffset = Shader.PropertyToID("_WindOffset");
private void Awake() {
sprite.sprite = randomSprites[Random.Range(0, randomSprites.Length)];
sprite.material.SetFloat(WindOffset, Random.Range(0f, 2f * Mathf.PI));
}
}

BIN
Assets/Sprites/Rosa/Garden/Rosa_Jardi_01.png (Stored with Git LFS) Normal file

Binary file not shown.

View file

@ -0,0 +1,127 @@
fileFormatVersion: 2
guid: 95cc449131190084689c7555e791f959
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
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
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 225
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,32 +0,0 @@
[LOG] System::create : Header version = 2.02.06. Current version = 2.02.06.
[LOG] Manager::init : maxchannels = 256 studioflags = 00000006 flags 00000000 extradriverdata 0000000000000000.
[LOG] SystemI::init : Initialize version=20206 (124257), maxchannels=256, flags=0x00020000
[LOG] SystemI::setOutputInternal : Setting output to 'FMOD WASAPI Output'
[LOG] OutputWASAPI::init : Mix Format (WAVEFORMATEX): wFormatTag=0xFFFE, nChannels=2, nSamplesPerSec=48000, nAvgBytesPerSec=384000, nBlockAlign=8, wBitsPerSample=32, cbSize=22.
[LOG] OutputWASAPI::init : Mix Format (WAVEFORMATEXTENSIBLE): wValidBitsPerSample=32, dwChannelMask=0x00000003, SubFormat=00000003-0000-0010-8000-00AA00389B71.
[LOG] OutputWASAPI::init : Output buffer size: 4096 samples, latency: 0.00ms, period: 10.00ms, DSP buffer: 1024 * 4
[LOG] Thread::initThread : Init FMOD stream thread. Affinity: 0x4000000000000003, Priority: 0xFFFF7FFB, Stack Size: 98304, Semaphore: No, Sleep Time: 10, Looping: Yes.
[LOG] Thread::initThread : Init FMOD mixer thread. Affinity: 0x4000000000000001, Priority: 0xFFFF7FFA, Stack Size: 81920, Semaphore: No, Sleep Time: 0, Looping: Yes.
[LOG] AsyncManager::init : manager 000001B757DCD1A8 isAsync 0 updatePeriod 0.02
[LOG] AsyncManager::init : done
[LOG] PlaybackSystem::init :
[LOG] Thread::initThread : Init FMOD Studio sample load thread. Affinity: 0x4000000000000003, Priority: 0xFFFF7FFD, Stack Size: 98304, Semaphore: No, Sleep Time: 1, Looping: No.
[LOG] PlaybackSystem::init : done
[LOG] Thread::initThread : Init FMOD Studio bank load thread. Affinity: 0x4000000000000003, Priority: 0xFFFF7FFD, Stack Size: 98304, Semaphore: No, Sleep Time: 1, Looping: No.
[LOG] Manager::init : done.
[LOG] SystemI::createSoundInternal : Create name='', mode=0x02000202
[LOG] SystemI::createSoundInternal : exinfo->cbsize = 224
[LOG] SystemI::createSoundInternal : exinfo->length = 28161664
[LOG] SystemI::createSoundInternal : exinfo->fileoffset = 10400
[LOG] SystemI::createSoundInternal : exinfo->numsubsounds = 1
[LOG] SystemI::createSoundInternal : exinfo->inclusionlist = 0000009D2BA6F328
[LOG] SystemI::createSoundInternal : exinfo->inclusionlistnum = 1
[LOG] SystemI::createSoundInternal : exinfo->suggestedsoundtype = 5
[LOG] SystemI::createSoundInternal : exinfo->useropen = 00007FF880C04660
[LOG] SystemI::createSoundInternal : exinfo->userclose = 00007FF880C04630
[LOG] SystemI::createSoundInternal : exinfo->userread = 00007FF880C04730
[LOG] SystemI::createSoundInternal : exinfo->userseek = 00007FF880C047F0
[LOG] SystemI::createSoundInternal : exinfo->fileuserdata = 000001B764B2DF88
[LOG] SystemI::createSoundInternal : exinfo->initialseekpostype = 1
[LOG] SystemI::DSPCodecPoolRegister : register codec pool for pool type 5
[LOG] SystemI::createSoundInternal : Sample 0/1: name='Rosa_grow_01', format=5, channels=2, frequency=48000, lengthbytes=53664, lengthpcm=264000, pcmblocksize=0, loopstart=0, loopend=0, mode=0x00000000, channelmask=0x00000000, channelorder=0, peakvolume=0.124284.