From 8ef8b304c06d9b46a030ef56f4772589f34255d8 Mon Sep 17 00:00:00 2001 From: Jason Durand 01 Date: Sun, 3 Apr 2022 19:03:14 -0400 Subject: [PATCH] Cleared nullable warnings --- Assets/Scripts/AIEntity.cs | 4 ++-- Assets/Scripts/Arena.cs | 6 +++--- Assets/Scripts/PlayerMovement.cs | 12 ++++++------ 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Assets/Scripts/AIEntity.cs b/Assets/Scripts/AIEntity.cs index 60040a7..3bf8eb3 100644 --- a/Assets/Scripts/AIEntity.cs +++ b/Assets/Scripts/AIEntity.cs @@ -5,9 +5,9 @@ using UnityEngine.Serialization; public class AIEntity : Entity { - [SerializeField] protected AudioSource attackSource; + [SerializeField] protected AudioSource attackSource = null!; - [SerializeField] protected AudioClip[] attackSounds; + [SerializeField] protected AudioClip[] attackSounds = null!; [FormerlySerializedAs("stats")] [SerializeField] diff --git a/Assets/Scripts/Arena.cs b/Assets/Scripts/Arena.cs index 970d559..ea15a5f 100644 --- a/Assets/Scripts/Arena.cs +++ b/Assets/Scripts/Arena.cs @@ -45,9 +45,9 @@ public class Arena : MonoBehaviour { SafeZone safeZone = null!; [field: SerializeField] int currWaveSize = 0; - [SerializeField] AudioSource waveSource; - [SerializeField] AudioClip[] waveSounds; - [HideInInspector] public SoundManager soundManager; + [SerializeField] AudioSource waveSource = null!; + [SerializeField] AudioClip[] waveSounds = null!; + [HideInInspector] public SoundManager soundManager = null!; void Awake() { diff --git a/Assets/Scripts/PlayerMovement.cs b/Assets/Scripts/PlayerMovement.cs index 75ebd08..b8d6d93 100644 --- a/Assets/Scripts/PlayerMovement.cs +++ b/Assets/Scripts/PlayerMovement.cs @@ -21,13 +21,13 @@ public class PlayerMovement : MonoBehaviour { VampireEntity vampireEntity = null!; Animator animator = null!; public bool facingRight { get; private set; } = true; - [HideInInspector] public ScreenShaker screenShaker; + [HideInInspector] public ScreenShaker screenShaker = null!; - [SerializeField] AudioSource jumpSource; - [SerializeField] AudioClip[] jumpSounds; - [SerializeField] AudioSource landSource; - [SerializeField] AudioClip[] landSounds; - [HideInInspector] public SoundManager soundManager; + [SerializeField] AudioSource jumpSource = null!; + [SerializeField] AudioClip[] jumpSounds = null!; + [SerializeField] AudioSource landSource = null!; + [SerializeField] AudioClip[] landSounds = null!; + [HideInInspector] public SoundManager soundManager = null!; bool lastJumpButton;