Josh
2 years ago
13 changed files with 1664 additions and 114 deletions
@ -0,0 +1,116 @@ |
|||||
|
%YAML 1.1 |
||||
|
%TAG !u! tag:unity3d.com,2011: |
||||
|
--- !u!1 &8800180563921210508 |
||||
|
GameObject: |
||||
|
m_ObjectHideFlags: 0 |
||||
|
m_CorrespondingSourceObject: {fileID: 0} |
||||
|
m_PrefabInstance: {fileID: 0} |
||||
|
m_PrefabAsset: {fileID: 0} |
||||
|
serializedVersion: 6 |
||||
|
m_Component: |
||||
|
- component: {fileID: 8800180563921210499} |
||||
|
- component: {fileID: 8800180563921210498} |
||||
|
- component: {fileID: 8800180563921210509} |
||||
|
- component: {fileID: 8800180563921210496} |
||||
|
m_Layer: 0 |
||||
|
m_Name: Bird |
||||
|
m_TagString: Bird |
||||
|
m_Icon: {fileID: 0} |
||||
|
m_NavMeshLayer: 0 |
||||
|
m_StaticEditorFlags: 0 |
||||
|
m_IsActive: 1 |
||||
|
--- !u!4 &8800180563921210499 |
||||
|
Transform: |
||||
|
m_ObjectHideFlags: 0 |
||||
|
m_CorrespondingSourceObject: {fileID: 0} |
||||
|
m_PrefabInstance: {fileID: 0} |
||||
|
m_PrefabAsset: {fileID: 0} |
||||
|
m_GameObject: {fileID: 8800180563921210508} |
||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} |
||||
|
m_LocalPosition: {x: 1137.7001, y: 597.95557, z: 0} |
||||
|
m_LocalScale: {x: 1, y: 1, z: 1} |
||||
|
m_Children: [] |
||||
|
m_Father: {fileID: 0} |
||||
|
m_RootOrder: 0 |
||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
||||
|
--- !u!212 &8800180563921210498 |
||||
|
SpriteRenderer: |
||||
|
m_ObjectHideFlags: 0 |
||||
|
m_CorrespondingSourceObject: {fileID: 0} |
||||
|
m_PrefabInstance: {fileID: 0} |
||||
|
m_PrefabAsset: {fileID: 0} |
||||
|
m_GameObject: {fileID: 8800180563921210508} |
||||
|
m_Enabled: 1 |
||||
|
m_CastShadows: 0 |
||||
|
m_ReceiveShadows: 0 |
||||
|
m_DynamicOccludee: 1 |
||||
|
m_MotionVectors: 1 |
||||
|
m_LightProbeUsage: 1 |
||||
|
m_ReflectionProbeUsage: 1 |
||||
|
m_RayTracingMode: 0 |
||||
|
m_RayTraceProcedural: 0 |
||||
|
m_RenderingLayerMask: 1 |
||||
|
m_RendererPriority: 0 |
||||
|
m_Materials: |
||||
|
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} |
||||
|
m_StaticBatchInfo: |
||||
|
firstSubMesh: 0 |
||||
|
subMeshCount: 0 |
||||
|
m_StaticBatchRoot: {fileID: 0} |
||||
|
m_ProbeAnchor: {fileID: 0} |
||||
|
m_LightProbeVolumeOverride: {fileID: 0} |
||||
|
m_ScaleInLightmap: 1 |
||||
|
m_ReceiveGI: 1 |
||||
|
m_PreserveUVs: 0 |
||||
|
m_IgnoreNormalsForChartDetection: 0 |
||||
|
m_ImportantGI: 0 |
||||
|
m_StitchLightmapSeams: 1 |
||||
|
m_SelectedEditorRenderState: 0 |
||||
|
m_MinimumChartSize: 4 |
||||
|
m_AutoUVMaxDistance: 0.5 |
||||
|
m_AutoUVMaxAngle: 89 |
||||
|
m_LightmapParameters: {fileID: 0} |
||||
|
m_SortingLayerID: 0 |
||||
|
m_SortingLayer: 0 |
||||
|
m_SortingOrder: 0 |
||||
|
m_Sprite: {fileID: 21300000, guid: b618c1b99c40e3a4c87d042969b1dcc0, type: 3} |
||||
|
m_Color: {r: 1, g: 1, b: 1, a: 1} |
||||
|
m_FlipX: 0 |
||||
|
m_FlipY: 0 |
||||
|
m_DrawMode: 0 |
||||
|
m_Size: {x: 1.32, y: 0.92} |
||||
|
m_AdaptiveModeThreshold: 0.5 |
||||
|
m_SpriteTileMode: 0 |
||||
|
m_WasSpriteAssigned: 1 |
||||
|
m_MaskInteraction: 0 |
||||
|
m_SpriteSortPoint: 0 |
||||
|
--- !u!114 &8800180563921210509 |
||||
|
MonoBehaviour: |
||||
|
m_ObjectHideFlags: 0 |
||||
|
m_CorrespondingSourceObject: {fileID: 0} |
||||
|
m_PrefabInstance: {fileID: 0} |
||||
|
m_PrefabAsset: {fileID: 0} |
||||
|
m_GameObject: {fileID: 8800180563921210508} |
||||
|
m_Enabled: 1 |
||||
|
m_EditorHideFlags: 0 |
||||
|
m_Script: {fileID: 11500000, guid: fd8ad88e69cd45a4ebfb8515d31be3d1, type: 3} |
||||
|
m_Name: |
||||
|
m_EditorClassIdentifier: |
||||
|
_blueBird: {fileID: 21300000, guid: 96ac1047b12197a429d1c6396c1a4675, type: 3} |
||||
|
_yellowBird: {fileID: 21300000, guid: b618c1b99c40e3a4c87d042969b1dcc0, type: 3} |
||||
|
--- !u!58 &8800180563921210496 |
||||
|
CircleCollider2D: |
||||
|
m_ObjectHideFlags: 0 |
||||
|
m_CorrespondingSourceObject: {fileID: 0} |
||||
|
m_PrefabInstance: {fileID: 0} |
||||
|
m_PrefabAsset: {fileID: 0} |
||||
|
m_GameObject: {fileID: 8800180563921210508} |
||||
|
m_Enabled: 1 |
||||
|
m_Density: 1 |
||||
|
m_Material: {fileID: 0} |
||||
|
m_IsTrigger: 1 |
||||
|
m_UsedByEffector: 0 |
||||
|
m_UsedByComposite: 0 |
||||
|
m_Offset: {x: 0, y: 0} |
||||
|
serializedVersion: 2 |
||||
|
m_Radius: 13.23 |
@ -0,0 +1,7 @@ |
|||||
|
fileFormatVersion: 2 |
||||
|
guid: 9777a80f11a5216499bc46c9edf06b7b |
||||
|
PrefabImporter: |
||||
|
externalObjects: {} |
||||
|
userData: |
||||
|
assetBundleName: |
||||
|
assetBundleVariant: |
File diff suppressed because it is too large
@ -0,0 +1,51 @@ |
|||||
|
using System.Collections; |
||||
|
using System.Collections.Generic; |
||||
|
using UnityEngine; |
||||
|
|
||||
|
public class Bird : MonoBehaviour |
||||
|
{ |
||||
|
const float horizontalSpeed = 200f; |
||||
|
const float verticalSpeed = 5f; |
||||
|
const float amplitude = 30f; |
||||
|
|
||||
|
private float startTime; |
||||
|
float _startingY; |
||||
|
[SerializeField] Sprite _blueBird; |
||||
|
[SerializeField] Sprite _yellowBird; |
||||
|
DragonMovement.AttackType _attackType; |
||||
|
|
||||
|
public DragonMovement.AttackType AttackType { get => _attackType; set => _attackType = value; } |
||||
|
|
||||
|
void Start() |
||||
|
{ |
||||
|
startTime = Time.time; |
||||
|
_startingY = transform.position.y; |
||||
|
|
||||
|
int type = Random.Range(0, 2); |
||||
|
if (type == 0) { |
||||
|
AttackType = DragonMovement.AttackType.CONE; |
||||
|
GetComponent<SpriteRenderer>().sprite = _blueBird; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
AttackType = DragonMovement.AttackType.FIREBALL; |
||||
|
GetComponent<SpriteRenderer>().sprite = _yellowBird; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
void Update() |
||||
|
{ |
||||
|
float y = _startingY + (amplitude * Mathf.Sin(verticalSpeed * (Time.time - startTime))); |
||||
|
transform.position = new Vector3(transform.position.x - Time.deltaTime * horizontalSpeed, y, transform.position.z); |
||||
|
|
||||
|
if (transform.position.x < -100f) |
||||
|
{ |
||||
|
GameObject.Destroy(this.gameObject); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public void Eat() |
||||
|
{ |
||||
|
GameObject.Destroy(this.gameObject); |
||||
|
} |
||||
|
} |
@ -0,0 +1,11 @@ |
|||||
|
fileFormatVersion: 2 |
||||
|
guid: fd8ad88e69cd45a4ebfb8515d31be3d1 |
||||
|
MonoImporter: |
||||
|
externalObjects: {} |
||||
|
serializedVersion: 2 |
||||
|
defaultReferences: [] |
||||
|
executionOrder: 0 |
||||
|
icon: {instanceID: 0} |
||||
|
userData: |
||||
|
assetBundleName: |
||||
|
assetBundleVariant: |
@ -0,0 +1,8 @@ |
|||||
|
fileFormatVersion: 2 |
||||
|
guid: 812936e8583d0264d8dcd3e8b123fb73 |
||||
|
folderAsset: yes |
||||
|
DefaultImporter: |
||||
|
externalObjects: {} |
||||
|
userData: |
||||
|
assetBundleName: |
||||
|
assetBundleVariant: |
After Width: | Height: | Size: 16 KiB |
@ -0,0 +1,109 @@ |
|||||
|
fileFormatVersion: 2 |
||||
|
guid: 96ac1047b12197a429d1c6396c1a4675 |
||||
|
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 |
||||
|
isReadable: 0 |
||||
|
streamingMipmaps: 0 |
||||
|
streamingMipmapsPriority: 0 |
||||
|
vTOnly: 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: 3 |
||||
|
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 |
||||
|
cookieLightType: 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 |
||||
|
- serializedVersion: 3 |
||||
|
buildTarget: Standalone |
||||
|
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: 5e97eb03825dee720800000000000000 |
||||
|
internalID: 0 |
||||
|
vertices: [] |
||||
|
indices: |
||||
|
edges: [] |
||||
|
weights: [] |
||||
|
secondaryTextures: [] |
||||
|
spritePackingTag: |
||||
|
pSDRemoveMatte: 0 |
||||
|
pSDShowRemoveMatteOption: 0 |
||||
|
userData: |
||||
|
assetBundleName: |
||||
|
assetBundleVariant: |
After Width: | Height: | Size: 17 KiB |
@ -0,0 +1,109 @@ |
|||||
|
fileFormatVersion: 2 |
||||
|
guid: b618c1b99c40e3a4c87d042969b1dcc0 |
||||
|
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 |
||||
|
isReadable: 0 |
||||
|
streamingMipmaps: 0 |
||||
|
streamingMipmapsPriority: 0 |
||||
|
vTOnly: 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: 3 |
||||
|
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 |
||||
|
cookieLightType: 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 |
||||
|
- serializedVersion: 3 |
||||
|
buildTarget: Standalone |
||||
|
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: 5e97eb03825dee720800000000000000 |
||||
|
internalID: 0 |
||||
|
vertices: [] |
||||
|
indices: |
||||
|
edges: [] |
||||
|
weights: [] |
||||
|
secondaryTextures: [] |
||||
|
spritePackingTag: |
||||
|
pSDRemoveMatte: 0 |
||||
|
pSDShowRemoveMatteOption: 0 |
||||
|
userData: |
||||
|
assetBundleName: |
||||
|
assetBundleVariant: |
Loading…
Reference in new issue