parent
be81262762
commit
9f770d399a
12 changed files with 352 additions and 8 deletions
@ -0,0 +1,47 @@ |
||||
%YAML 1.1 |
||||
%TAG !u! tag:unity3d.com,2011: |
||||
--- !u!21 &2100000 |
||||
Material: |
||||
serializedVersion: 8 |
||||
m_ObjectHideFlags: 0 |
||||
m_CorrespondingSourceObject: {fileID: 0} |
||||
m_PrefabInstance: {fileID: 0} |
||||
m_PrefabAsset: {fileID: 0} |
||||
m_Name: NewBall |
||||
m_Shader: {fileID: 4800000, guid: da25e23f4bce4102a45b0743b67525c4, type: 3} |
||||
m_ValidKeywords: [] |
||||
m_InvalidKeywords: [] |
||||
m_LightmapFlags: 4 |
||||
m_EnableInstancingVariants: 0 |
||||
m_DoubleSidedGI: 0 |
||||
m_CustomRenderQueue: -1 |
||||
stringTagMap: {} |
||||
disabledShaderPasses: [] |
||||
m_SavedProperties: |
||||
serializedVersion: 3 |
||||
m_TexEnvs: |
||||
- _AlphaTex: |
||||
m_Texture: {fileID: 0} |
||||
m_Scale: {x: 1, y: 1} |
||||
m_Offset: {x: 0, y: 0} |
||||
- _MainTex: |
||||
m_Texture: {fileID: 0} |
||||
m_Scale: {x: 1, y: 1} |
||||
m_Offset: {x: 0, y: 0} |
||||
- _MaskTex: |
||||
m_Texture: {fileID: 0} |
||||
m_Scale: {x: 1, y: 1} |
||||
m_Offset: {x: 0, y: 0} |
||||
- _NormalMap: |
||||
m_Texture: {fileID: 0} |
||||
m_Scale: {x: 1, y: 1} |
||||
m_Offset: {x: 0, y: 0} |
||||
m_Ints: [] |
||||
m_Floats: |
||||
- PixelSnap: 0 |
||||
- _EnableExternalAlpha: 0 |
||||
m_Colors: |
||||
- _Color: {r: 1.319508, g: 1.319508, b: 1.319508, a: 1} |
||||
- _Flip: {r: 1, g: 1, b: 1, a: 1} |
||||
- _RendererColor: {r: 1, g: 1, b: 1, a: 1} |
||||
m_BuildTextureStacks: [] |
@ -0,0 +1,8 @@ |
||||
fileFormatVersion: 2 |
||||
guid: efe64386af2c943be9fe140cdb79ee9b |
||||
NativeFormatImporter: |
||||
externalObjects: {} |
||||
mainObjectFileID: 2100000 |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
@ -0,0 +1,220 @@ |
||||
%YAML 1.1 |
||||
%TAG !u! tag:unity3d.com,2011: |
||||
--- !u!1 &2068902108434861102 |
||||
GameObject: |
||||
m_ObjectHideFlags: 0 |
||||
m_CorrespondingSourceObject: {fileID: 0} |
||||
m_PrefabInstance: {fileID: 0} |
||||
m_PrefabAsset: {fileID: 0} |
||||
serializedVersion: 6 |
||||
m_Component: |
||||
- component: {fileID: 3019560421038336810} |
||||
- component: {fileID: 4286311027153464049} |
||||
m_Layer: 7 |
||||
m_Name: MainColor |
||||
m_TagString: Untagged |
||||
m_Icon: {fileID: 0} |
||||
m_NavMeshLayer: 0 |
||||
m_StaticEditorFlags: 0 |
||||
m_IsActive: 1 |
||||
--- !u!4 &3019560421038336810 |
||||
Transform: |
||||
m_ObjectHideFlags: 0 |
||||
m_CorrespondingSourceObject: {fileID: 0} |
||||
m_PrefabInstance: {fileID: 0} |
||||
m_PrefabAsset: {fileID: 0} |
||||
m_GameObject: {fileID: 2068902108434861102} |
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} |
||||
m_LocalPosition: {x: 0, y: 0, z: 0} |
||||
m_LocalScale: {x: 0.9, y: 0.9, z: 0.9} |
||||
m_ConstrainProportionsScale: 1 |
||||
m_Children: [] |
||||
m_Father: {fileID: 5863603256186968683} |
||||
m_RootOrder: 0 |
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
||||
--- !u!212 &4286311027153464049 |
||||
SpriteRenderer: |
||||
m_ObjectHideFlags: 0 |
||||
m_CorrespondingSourceObject: {fileID: 0} |
||||
m_PrefabInstance: {fileID: 0} |
||||
m_PrefabAsset: {fileID: 0} |
||||
m_GameObject: {fileID: 2068902108434861102} |
||||
m_Enabled: 1 |
||||
m_CastShadows: 0 |
||||
m_ReceiveShadows: 0 |
||||
m_DynamicOccludee: 1 |
||||
m_StaticShadowCaster: 0 |
||||
m_MotionVectors: 1 |
||||
m_LightProbeUsage: 1 |
||||
m_ReflectionProbeUsage: 1 |
||||
m_RayTracingMode: 0 |
||||
m_RayTraceProcedural: 0 |
||||
m_RenderingLayerMask: 1 |
||||
m_RendererPriority: 0 |
||||
m_Materials: |
||||
- {fileID: 2100000, guid: efe64386af2c943be9fe140cdb79ee9b, type: 2} |
||||
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: 1 |
||||
m_Sprite: {fileID: 21300000, guid: 47e353a78c92b9838963e533e37462e5, 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, y: 1} |
||||
m_AdaptiveModeThreshold: 0.5 |
||||
m_SpriteTileMode: 0 |
||||
m_WasSpriteAssigned: 1 |
||||
m_MaskInteraction: 0 |
||||
m_SpriteSortPoint: 0 |
||||
--- !u!1 &5863603256186968685 |
||||
GameObject: |
||||
m_ObjectHideFlags: 0 |
||||
m_CorrespondingSourceObject: {fileID: 0} |
||||
m_PrefabInstance: {fileID: 0} |
||||
m_PrefabAsset: {fileID: 0} |
||||
serializedVersion: 6 |
||||
m_Component: |
||||
- component: {fileID: 5863603256186968683} |
||||
- component: {fileID: 5863603256186968682} |
||||
- component: {fileID: 5863603256186968680} |
||||
- component: {fileID: 5863603256186968662} |
||||
- component: {fileID: 5863603256186968681} |
||||
m_Layer: 7 |
||||
m_Name: NewBall |
||||
m_TagString: Untagged |
||||
m_Icon: {fileID: 0} |
||||
m_NavMeshLayer: 0 |
||||
m_StaticEditorFlags: 0 |
||||
m_IsActive: 1 |
||||
--- !u!4 &5863603256186968683 |
||||
Transform: |
||||
m_ObjectHideFlags: 0 |
||||
m_CorrespondingSourceObject: {fileID: 0} |
||||
m_PrefabInstance: {fileID: 0} |
||||
m_PrefabAsset: {fileID: 0} |
||||
m_GameObject: {fileID: 5863603256186968685} |
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} |
||||
m_LocalPosition: {x: 0, y: 0, z: 0} |
||||
m_LocalScale: {x: 0.75, y: 0.75, z: 0.75} |
||||
m_ConstrainProportionsScale: 1 |
||||
m_Children: |
||||
- {fileID: 3019560421038336810} |
||||
m_Father: {fileID: 0} |
||||
m_RootOrder: 0 |
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
||||
--- !u!212 &5863603256186968682 |
||||
SpriteRenderer: |
||||
m_ObjectHideFlags: 0 |
||||
m_CorrespondingSourceObject: {fileID: 0} |
||||
m_PrefabInstance: {fileID: 0} |
||||
m_PrefabAsset: {fileID: 0} |
||||
m_GameObject: {fileID: 5863603256186968685} |
||||
m_Enabled: 1 |
||||
m_CastShadows: 0 |
||||
m_ReceiveShadows: 0 |
||||
m_DynamicOccludee: 1 |
||||
m_StaticShadowCaster: 0 |
||||
m_MotionVectors: 1 |
||||
m_LightProbeUsage: 1 |
||||
m_ReflectionProbeUsage: 1 |
||||
m_RayTracingMode: 0 |
||||
m_RayTraceProcedural: 0 |
||||
m_RenderingLayerMask: 1 |
||||
m_RendererPriority: 0 |
||||
m_Materials: |
||||
- {fileID: 2100000, guid: efe64386af2c943be9fe140cdb79ee9b, type: 2} |
||||
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: 47e353a78c92b9838963e533e37462e5, 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, y: 1} |
||||
m_AdaptiveModeThreshold: 0.5 |
||||
m_SpriteTileMode: 0 |
||||
m_WasSpriteAssigned: 1 |
||||
m_MaskInteraction: 0 |
||||
m_SpriteSortPoint: 0 |
||||
--- !u!58 &5863603256186968680 |
||||
CircleCollider2D: |
||||
m_ObjectHideFlags: 0 |
||||
m_CorrespondingSourceObject: {fileID: 0} |
||||
m_PrefabInstance: {fileID: 0} |
||||
m_PrefabAsset: {fileID: 0} |
||||
m_GameObject: {fileID: 5863603256186968685} |
||||
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: 0.5 |
||||
--- !u!114 &5863603256186968662 |
||||
MonoBehaviour: |
||||
m_ObjectHideFlags: 0 |
||||
m_CorrespondingSourceObject: {fileID: 0} |
||||
m_PrefabInstance: {fileID: 0} |
||||
m_PrefabAsset: {fileID: 0} |
||||
m_GameObject: {fileID: 5863603256186968685} |
||||
m_Enabled: 1 |
||||
m_EditorHideFlags: 0 |
||||
m_Script: {fileID: 11500000, guid: c1f92e3c448648a3977db1730f02b11d, type: 3} |
||||
m_Name: |
||||
m_EditorClassIdentifier: |
||||
permanentDuration: 5 |
||||
temporaryDuration: 10 |
||||
--- !u!114 &5863603256186968681 |
||||
MonoBehaviour: |
||||
m_ObjectHideFlags: 0 |
||||
m_CorrespondingSourceObject: {fileID: 0} |
||||
m_PrefabInstance: {fileID: 0} |
||||
m_PrefabAsset: {fileID: 0} |
||||
m_GameObject: {fileID: 5863603256186968685} |
||||
m_Enabled: 1 |
||||
m_EditorHideFlags: 0 |
||||
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3} |
||||
m_Name: |
||||
m_EditorClassIdentifier: |
||||
GlobalObjectIdHash: 951099334 |
||||
AlwaysReplicateAsRoot: 0 |
||||
DontDestroyWithOwner: 0 |
||||
AutoObjectParentSync: 1 |
@ -0,0 +1,7 @@ |
||||
fileFormatVersion: 2 |
||||
guid: 0b8e2f55b0355b500bb1a8ab627c8833 |
||||
PrefabImporter: |
||||
externalObjects: {} |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
@ -0,0 +1,37 @@ |
||||
using UnityEngine; |
||||
|
||||
namespace Game { |
||||
|
||||
public class NewBall : Collectable { |
||||
|
||||
public float permanentDuration; |
||||
public float temporaryDuration; |
||||
|
||||
private bool isPermanent; |
||||
public bool IsPermanent { |
||||
private get => isPermanent; |
||||
set { |
||||
isPermanent = value; |
||||
const float intensity = 1f; |
||||
float factor = Mathf.Pow(2, intensity); |
||||
float r = value ? 1 : 0; |
||||
float g = 1; |
||||
float b = value ? 0 : 1; |
||||
Color borderColor = new Vector4(r, g, b, 1) * factor; |
||||
GetComponent<SpriteRenderer>().material.color = borderColor; |
||||
} |
||||
} |
||||
|
||||
protected override void Setup() { |
||||
|
||||
} |
||||
|
||||
protected override float Duration() { |
||||
return IsPermanent ? permanentDuration : temporaryDuration; |
||||
} |
||||
|
||||
protected override void OnCollect(Player player) { |
||||
GameManager.Singleton.SpawnBall(player, isPermanent); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,3 @@ |
||||
fileFormatVersion: 2 |
||||
guid: c1f92e3c448648a3977db1730f02b11d |
||||
timeCreated: 1681653966 |
Loading…
Reference in new issue