Skip to content

Commit

Permalink
let consumables rotate and billboard
Browse files Browse the repository at this point in the history
  • Loading branch information
leon-arndt committed Oct 15, 2022
1 parent e9fd2fa commit d92688b
Show file tree
Hide file tree
Showing 8 changed files with 289 additions and 9 deletions.
80 changes: 80 additions & 0 deletions Assets/3D/Facing.mat
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
%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: Facing
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
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}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
m_BuildTextureStacks: []
8 changes: 8 additions & 0 deletions Assets/3D/Facing.mat.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

65 changes: 62 additions & 3 deletions Assets/Prefabs/World/FishBig.prefab
Original file line number Diff line number Diff line change
@@ -1,5 +1,50 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &4292178246525251774
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 294921913657076138}
- component: {fileID: 4622018596538020822}
m_Layer: 0
m_Name: Billboard
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &294921913657076138
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4292178246525251774}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 253397948414809833}
m_Father: {fileID: 8796368315286724536}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &4622018596538020822
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4292178246525251774}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 32c6a26b2a994044ab182fda4d83c6fe, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &6990947650709729074
GameObject:
m_ObjectHideFlags: 0
Expand All @@ -10,6 +55,7 @@ GameObject:
m_Component:
- component: {fileID: 253397948414809833}
- component: {fileID: 2989946979991083213}
- component: {fileID: 12717747944954731}
m_Layer: 0
m_Name: fish
m_TagString: Untagged
Expand All @@ -25,11 +71,11 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6990947650709729074}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: -0.18, z: 0}
m_LocalPosition: {x: 0, y: -0.18000007, z: 0}
m_LocalScale: {x: 2, y: 2, z: 2}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 8796368315286724536}
m_Father: {fileID: 294921913657076138}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &2989946979991083213
Expand Down Expand Up @@ -84,6 +130,19 @@ SpriteRenderer:
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!114 &12717747944954731
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6990947650709729074}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d739f4952b546ca459aabc3ecb338b30, type: 3}
m_Name:
m_EditorClassIdentifier:
speed: 1
--- !u!1 &7198538926193525472
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -114,7 +173,7 @@ Transform:
m_LocalScale: {x: 0.5, y: 0.5, z: 0.5}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 253397948414809833}
- {fileID: 294921913657076138}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
Expand Down
65 changes: 62 additions & 3 deletions Assets/Prefabs/World/FishRegular.prefab
Original file line number Diff line number Diff line change
@@ -1,5 +1,50 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1445498334519568960
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 597460083010412058}
- component: {fileID: 4658944169736794231}
m_Layer: 0
m_Name: Billboard
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &597460083010412058
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1445498334519568960}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 253397948414809833}
m_Father: {fileID: 8796368315286724536}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &4658944169736794231
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1445498334519568960}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 32c6a26b2a994044ab182fda4d83c6fe, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &6990947650709729074
GameObject:
m_ObjectHideFlags: 0
Expand All @@ -10,6 +55,7 @@ GameObject:
m_Component:
- component: {fileID: 253397948414809833}
- component: {fileID: 2989946979991083213}
- component: {fileID: 7967489781251100361}
m_Layer: 0
m_Name: fish
m_TagString: Untagged
Expand All @@ -25,11 +71,11 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6990947650709729074}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: -0.18, z: 0}
m_LocalPosition: {x: 0, y: -0.18000007, z: 0}
m_LocalScale: {x: 2, y: 2, z: 2}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 8796368315286724536}
m_Father: {fileID: 597460083010412058}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &2989946979991083213
Expand Down Expand Up @@ -84,6 +130,19 @@ SpriteRenderer:
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!114 &7967489781251100361
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6990947650709729074}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d739f4952b546ca459aabc3ecb338b30, type: 3}
m_Name:
m_EditorClassIdentifier:
speed: 1
--- !u!1 &7198538926193525472
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -114,7 +173,7 @@ Transform:
m_LocalScale: {x: 0.5, y: 0.5, z: 0.5}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 253397948414809833}
- {fileID: 597460083010412058}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
Expand Down
63 changes: 61 additions & 2 deletions Assets/Prefabs/World/FishSmall.prefab
Original file line number Diff line number Diff line change
@@ -1,5 +1,50 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &3753481881638264158
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 495342306432811189}
- component: {fileID: 424132662179851431}
m_Layer: 0
m_Name: Billboard
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &495342306432811189
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3753481881638264158}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 253397948414809833}
m_Father: {fileID: 8796368315286724536}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &424132662179851431
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3753481881638264158}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 32c6a26b2a994044ab182fda4d83c6fe, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &6990947650709729074
GameObject:
m_ObjectHideFlags: 0
Expand All @@ -10,6 +55,7 @@ GameObject:
m_Component:
- component: {fileID: 253397948414809833}
- component: {fileID: 2989946979991083213}
- component: {fileID: 5710176888439860105}
m_Layer: 0
m_Name: fish
m_TagString: Untagged
Expand All @@ -29,7 +75,7 @@ Transform:
m_LocalScale: {x: 2, y: 2, z: 2}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 8796368315286724536}
m_Father: {fileID: 495342306432811189}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &2989946979991083213
Expand Down Expand Up @@ -84,6 +130,19 @@ SpriteRenderer:
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!114 &5710176888439860105
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6990947650709729074}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d739f4952b546ca459aabc3ecb338b30, type: 3}
m_Name:
m_EditorClassIdentifier:
speed: 1
--- !u!1 &7198538926193525472
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -114,7 +173,7 @@ Transform:
m_LocalScale: {x: 0.5, y: 0.5, z: 0.5}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 253397948414809833}
- {fileID: 495342306432811189}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/GenericComponents/Rotator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ public class Rotator : MonoBehaviour
{
[SerializeField] private float speed = 1f;

private void Update()
private void LateUpdate()
{
transform.Rotate(new Vector3(0, 0, 45) * (Time.deltaTime * speed));
}
Expand Down
Loading

0 comments on commit d92688b

Please sign in to comment.