From f67ff54403576ed37a7319e63390b30eab29d7cf Mon Sep 17 00:00:00 2001 From: Dom Harris Date: Sun, 10 Jan 2021 14:56:55 +0000 Subject: [PATCH] no more spin --- Assets/Materials/Bullet.mat | 2 +- Assets/Scenes/Chief's Sandbox.unity | 6 +++--- Assets/Scripts/EnemyAppearBehaviour.cs | 9 +-------- Assets/Weapons/PlayerWeapon.asset | 7 ++++--- 4 files changed, 9 insertions(+), 15 deletions(-) diff --git a/Assets/Materials/Bullet.mat b/Assets/Materials/Bullet.mat index 8b07143..ccc79f5 100644 --- a/Assets/Materials/Bullet.mat +++ b/Assets/Materials/Bullet.mat @@ -65,7 +65,7 @@ Material: m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _NoiseMap: - m_Texture: {fileID: 0} + m_Texture: {fileID: 2800000, guid: 32d99a4d1161f0f4ca4fca2997778b37, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _OcclusionMap: diff --git a/Assets/Scenes/Chief's Sandbox.unity b/Assets/Scenes/Chief's Sandbox.unity index f48f960..2d0a048 100644 --- a/Assets/Scenes/Chief's Sandbox.unity +++ b/Assets/Scenes/Chief's Sandbox.unity @@ -506,7 +506,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 3397488660842926093, guid: 1f82f952c53fc7449a0091cf29ba3def, type: 3} propertyPath: m_LocalScale.x - value: 1759.5208 + value: 1492.1846 objectReference: {fileID: 0} - target: {fileID: 3397488660842926093, guid: 1f82f952c53fc7449a0091cf29ba3def, type: 3} propertyPath: m_LocalScale.y @@ -898,7 +898,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1222495242} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: -0.62, z: 0} + m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1173812008} @@ -947,7 +947,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 9463c7c973b354f1c882567f52337aed, type: 3} m_Name: m_EditorClassIdentifier: - numObjects: 3000 + numObjects: 500 prefab: {fileID: 1738226812227614580, guid: e084e082567284f79a41423c4fe1adab, type: 3} numToSpawnPerFrame: 10 --- !u!1 &1581716069 diff --git a/Assets/Scripts/EnemyAppearBehaviour.cs b/Assets/Scripts/EnemyAppearBehaviour.cs index 668d39d..c8e4da6 100644 --- a/Assets/Scripts/EnemyAppearBehaviour.cs +++ b/Assets/Scripts/EnemyAppearBehaviour.cs @@ -5,21 +5,14 @@ using UnityEngine; [CreateAssetMenu] public class EnemyAppearBehaviour : BaseBulletBehaviour { - [SerializeField] private float zPos = 50f; - [SerializeField] private float moveInDuration = 0.5f; [SerializeField] private float scaleUpDuration = 0.3f; [SerializeField] private float scaleUpDelay = 0.2f; - [SerializeField] private float moveOutPos = -15f; - [SerializeField] private float moveOutDuration = 2f; public override void DoBehaviour(Transform bullet, float size, Vector3 pos) { bullet.localScale = Vector3.zero; - bullet.localPosition = new Vector3(pos.x, pos.y, zPos); + bullet.localPosition = pos; DOTween.Sequence() - //.Append(bullet.DOMove(pos, moveInDuration).SetEase(Ease.OutQuint)) - .Insert(scaleUpDelay, bullet.DORotate(new Vector3(0,0,45), moveInDuration/2f)) - .Insert(scaleUpDelay + moveInDuration/2f, bullet.DORotate(Vector3.zero, moveInDuration/2f)) .Insert(scaleUpDelay, bullet.DOScale(Vector3.one * size, scaleUpDuration).SetEase(Ease.OutQuint)); } } \ No newline at end of file diff --git a/Assets/Weapons/PlayerWeapon.asset b/Assets/Weapons/PlayerWeapon.asset index 4fb4b4d..9eb67b3 100644 --- a/Assets/Weapons/PlayerWeapon.asset +++ b/Assets/Weapons/PlayerWeapon.asset @@ -104,12 +104,13 @@ MonoBehaviour: collidesWith: serializedVersion: 2 m_Bits: 128 - accuracy: 5 + accuracy: 2 zone: numToSpawn: 1 - offset: {x: 0, y: 0} - spawnType: 2 + offset: {x: 0, y: 0, z: 0} + spawnType: 0 spawnDir: 0 + spawnPlane: 1 width: 0 height: 0 surfaceOnly: 1