refactor: code styles enforced with .editorconfig

This commit is contained in:
2025-03-17 21:32:37 +03:00
parent d71c135491
commit 9af44d48b3
22 changed files with 243 additions and 48 deletions

View File

@@ -1,7 +1,6 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using Syntriax.Engine.Core.Abstract;
@@ -32,7 +31,6 @@ public class BehaviourController : IBehaviourController
public IGameObject GameObject => _gameObject;
public bool IsInitialized
{
get => _initialized;
@@ -67,7 +65,7 @@ public class BehaviourController : IBehaviourController
public T? GetBehaviour<T>()
{
foreach (var behaviourItem in behaviours)
foreach (IBehaviour behaviourItem in behaviours)
if (behaviourItem is T result)
return result;
@@ -77,7 +75,7 @@ public class BehaviourController : IBehaviourController
public IList<T> GetBehaviours<T>()
{
List<T>? behaviours = null;
foreach (var behaviourItem in this.behaviours)
foreach (IBehaviour behaviourItem in this.behaviours)
{
if (behaviourItem is not T behaviour)
continue;
@@ -92,7 +90,7 @@ public class BehaviourController : IBehaviourController
public void GetBehaviours<T>(IList<T> results)
{
results.Clear();
foreach (var behaviourItem in behaviours)
foreach (IBehaviour behaviourItem in behaviours)
{
if (behaviourItem is not T behaviour)
continue;
@@ -136,7 +134,6 @@ public class BehaviourController : IBehaviourController
return true;
}
public bool Initialize()
{
if (IsInitialized)
@@ -210,7 +207,6 @@ public class BehaviourController : IBehaviourController
behaviours.Add(behaviour);
}
private void OnPriorityChange(IBehaviour sender, int previousPriority)
{
behaviours.Remove(sender);