Refactor namespaces
This commit is contained in:
parent
4475fd4305
commit
3b865bbd13
@ -1,4 +1,5 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using Saltosion.OneWeapon.Enemies;
|
||||||
|
|
||||||
namespace Saltosion.OneWeapon.AI {
|
namespace Saltosion.OneWeapon.AI {
|
||||||
public abstract class AIBehaviour : MonoBehaviour {
|
public abstract class AIBehaviour : MonoBehaviour {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using Saltosion.OneWeapon.Enemies;
|
||||||
|
|
||||||
namespace Saltosion.OneWeapon.AI {
|
namespace Saltosion.OneWeapon.AI {
|
||||||
[Serializable]
|
[Serializable]
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using Saltosion.OneWeapon.Enemies;
|
||||||
|
|
||||||
namespace Saltosion.OneWeapon.AI {
|
namespace Saltosion.OneWeapon.AI {
|
||||||
[Serializable]
|
[Serializable]
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using Saltosion.OneWeapon.Enemies;
|
||||||
|
|
||||||
namespace Saltosion.OneWeapon.AI {
|
namespace Saltosion.OneWeapon.AI {
|
||||||
[Serializable]
|
[Serializable]
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using Saltosion.OneWeapon.Enemies;
|
||||||
|
|
||||||
namespace Saltosion.OneWeapon.AI.Behaviours {
|
namespace Saltosion.OneWeapon.AI.Behaviours {
|
||||||
public class Follow : AIBehaviour {
|
public class Follow : AIBehaviour {
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using Saltosion.OneWeapon.Player;
|
||||||
|
using Saltosion.OneWeapon.Enemies;
|
||||||
|
|
||||||
namespace Saltosion.OneWeapon.AI.Behaviours {
|
namespace Saltosion.OneWeapon.AI.Behaviours {
|
||||||
public class MeleeAttackFollowed : AIBehaviour {
|
public class MeleeAttackFollowed : AIBehaviour {
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using Saltosion.OneWeapon.Enemies;
|
||||||
|
|
||||||
namespace Saltosion.OneWeapon.AI.Behaviours {
|
namespace Saltosion.OneWeapon.AI.Behaviours {
|
||||||
public class Wander : AIBehaviour {
|
public class Wander : AIBehaviour {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using Saltosion.OneWeapon.AI;
|
using Saltosion.OneWeapon.AI;
|
||||||
|
|
||||||
namespace Saltosion.OneWeapon {
|
namespace Saltosion.OneWeapon.AI {
|
||||||
[RequireComponent(typeof(AI.Behaviours.Follow), typeof(AI.Triggers.EnemySighted))]
|
[RequireComponent(typeof(AI.Behaviours.Follow), typeof(AI.Triggers.EnemySighted))]
|
||||||
public class EnemyFollower : MonoBehaviour {
|
public class EnemyFollower : MonoBehaviour {
|
||||||
public AI.Behaviours.Follow Follow;
|
public AI.Behaviours.Follow Follow;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using Saltosion.OneWeapon.AI;
|
using Saltosion.OneWeapon.AI;
|
||||||
|
|
||||||
namespace Saltosion.OneWeapon {
|
namespace Saltosion.OneWeapon.AI {
|
||||||
[RequireComponent(typeof(AI.Behaviours.Follow), typeof(AI.Triggers.PlayerSighted))]
|
[RequireComponent(typeof(AI.Behaviours.Follow), typeof(AI.Triggers.PlayerSighted))]
|
||||||
public class PlayerFollower : MonoBehaviour {
|
public class PlayerFollower : MonoBehaviour {
|
||||||
public AI.Behaviours.Follow Follow;
|
public AI.Behaviours.Follow Follow;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using Saltosion.OneWeapon.Enemies;
|
||||||
|
|
||||||
namespace Saltosion.OneWeapon.AI {
|
namespace Saltosion.OneWeapon.AI {
|
||||||
public abstract class Trigger : MonoBehaviour {
|
public abstract class Trigger : MonoBehaviour {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using Saltosion.OneWeapon.Utils;
|
using Saltosion.OneWeapon.Utils;
|
||||||
|
using Saltosion.OneWeapon.Enemies;
|
||||||
|
|
||||||
namespace Saltosion.OneWeapon.AI.Triggers {
|
namespace Saltosion.OneWeapon.AI.Triggers {
|
||||||
public class EnemySighted : Trigger {
|
public class EnemySighted : Trigger {
|
||||||
|
@ -1,13 +1,15 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using Saltosion.OneWeapon.Utils;
|
using Saltosion.OneWeapon.Utils;
|
||||||
|
using Saltosion.OneWeapon.Player;
|
||||||
|
using Saltosion.OneWeapon.Enemies;
|
||||||
|
|
||||||
namespace Saltosion.OneWeapon.AI.Triggers {
|
namespace Saltosion.OneWeapon.AI.Triggers {
|
||||||
public class PlayerSighted : Trigger {
|
public class PlayerSighted : Trigger {
|
||||||
public float Radius;
|
public float Radius;
|
||||||
public Player Player { get; private set; }
|
public PlayerController Player { get; private set; }
|
||||||
|
|
||||||
public override bool IsTriggered(Enemy subject) {
|
public override bool IsTriggered(Enemy subject) {
|
||||||
Player = Util.GetClosestTo<Player>(transform, Radius, true);
|
Player = Util.GetClosestTo<PlayerController>(transform, Radius, true);
|
||||||
return Player != null;
|
return Player != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Saltosion.OneWeapon {
|
namespace Saltosion.OneWeapon.Effects {
|
||||||
public class BloodDripper : MonoBehaviour {
|
public class BloodDripper : MonoBehaviour {
|
||||||
public Vector2 DripOffset = new Vector2(0, -0.5f);
|
public Vector2 DripOffset = new Vector2(0, -0.5f);
|
||||||
public int DripCount = 5;
|
public int DripCount = 5;
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using Saltosion.OneWeapon.Utils;
|
||||||
|
|
||||||
namespace Saltosion.OneWeapon {
|
namespace Saltosion.OneWeapon.Effects {
|
||||||
public class BloodLauncher : MonoBehaviour {
|
public class BloodLauncher : MonoBehaviour {
|
||||||
private static BloodLauncher Singleton;
|
private static BloodLauncher Singleton;
|
||||||
public GameObject StructuralParticlePrefab;
|
public GameObject StructuralParticlePrefab;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Saltosion.OneWeapon {
|
namespace Saltosion.OneWeapon.Effects {
|
||||||
public class BloodParticle : MonoBehaviour {
|
public class BloodParticle : MonoBehaviour {
|
||||||
public SpriteRenderer Renderer;
|
public SpriteRenderer Renderer;
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Saltosion.OneWeapon {
|
namespace Saltosion.OneWeapon.Effects {
|
||||||
public class CameraFX : MonoBehaviour {
|
public class CameraFX : MonoBehaviour {
|
||||||
public Transform Player;
|
public Transform Player;
|
||||||
public Transform ShakeHandle;
|
public Transform ShakeHandle;
|
||||||
|
@ -1,8 +1,11 @@
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using Saltosion.OneWeapon.Utils;
|
||||||
|
using Saltosion.OneWeapon.Player;
|
||||||
|
using Saltosion.OneWeapon.Enemies;
|
||||||
|
|
||||||
namespace Saltosion.OneWeapon {
|
namespace Saltosion.OneWeapon.Effects {
|
||||||
public class Explodable : MonoBehaviour {
|
public class Explodable : MonoBehaviour {
|
||||||
public GameObject[] BodypartPrefabs;
|
public GameObject[] BodypartPrefabs;
|
||||||
public bool DebugExplode = false;
|
public bool DebugExplode = false;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using Saltosion.OneWeapon.AI;
|
using Saltosion.OneWeapon.AI;
|
||||||
|
|
||||||
namespace Saltosion.OneWeapon {
|
namespace Saltosion.OneWeapon.Enemies {
|
||||||
[RequireComponent(typeof(Rigidbody2D))]
|
[RequireComponent(typeof(Rigidbody2D))]
|
||||||
public class Enemy : MonoBehaviour {
|
public class Enemy : MonoBehaviour {
|
||||||
[Header("Debug Info")]
|
[Header("Debug Info")]
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Saltosion.OneWeapon {
|
namespace Saltosion.OneWeapon.Enemies {
|
||||||
public class EnemySpawner : MonoBehaviour {
|
public class EnemySpawner : MonoBehaviour {
|
||||||
public GameObject[] EnemyPrefabs;
|
public GameObject[] EnemyPrefabs;
|
||||||
public float SpawnCooldown = 5.0f;
|
public float SpawnCooldown = 5.0f;
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using Saltosion.OneWeapon.Player;
|
||||||
|
using Saltosion.OneWeapon.Effects;
|
||||||
|
|
||||||
namespace Saltosion.OneWeapon {
|
namespace Saltosion.OneWeapon.Enemies {
|
||||||
public class Health : MonoBehaviour {
|
public class Health : MonoBehaviour {
|
||||||
public float MaxHealth;
|
public float MaxHealth;
|
||||||
public float CurrentHealth;
|
public float CurrentHealth;
|
||||||
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.SceneManagement;
|
using UnityEngine.SceneManagement;
|
||||||
|
|
||||||
namespace Saltosion.OneWeapon.Menus {
|
namespace Saltosion.OneWeapon.GUI {
|
||||||
public class BackToMainMenuButton : MonoBehaviour {
|
public class BackToMainMenuButton : MonoBehaviour {
|
||||||
public int MainMenuScene;
|
public int MainMenuScene;
|
||||||
|
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using Saltosion.OneWeapon.Utils;
|
||||||
|
|
||||||
namespace Saltosion.OneWeapon.Menus {
|
namespace Saltosion.OneWeapon.GUI {
|
||||||
public class GoreToggler : MonoBehaviour {
|
public class GoreToggler : MonoBehaviour {
|
||||||
public GameObject GoreObject;
|
public GameObject GoreObject;
|
||||||
public GameObject CensoredObject;
|
public GameObject CensoredObject;
|
||||||
|
@ -2,8 +2,9 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
using Saltosion.OneWeapon.Player;
|
||||||
|
|
||||||
namespace Saltosion.OneWeapon {
|
namespace Saltosion.OneWeapon.GUI {
|
||||||
public class HUDController : MonoBehaviour {
|
public class HUDController : MonoBehaviour {
|
||||||
|
|
||||||
public PlayerFun PlayerFun;
|
public PlayerFun PlayerFun;
|
||||||
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.SceneManagement;
|
using UnityEngine.SceneManagement;
|
||||||
|
|
||||||
namespace Saltosion.OneWeapon.Menus {
|
namespace Saltosion.OneWeapon.GUI {
|
||||||
public class MainMenuController : MonoBehaviour {
|
public class MainMenuController : MonoBehaviour {
|
||||||
public int PlayGameScene;
|
public int PlayGameScene;
|
||||||
public int OptionsMenuScene;
|
public int OptionsMenuScene;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Saltosion.OneWeapon {
|
namespace Saltosion.OneWeapon.Guns {
|
||||||
public class Bullet : MonoBehaviour {
|
public class Bullet : MonoBehaviour {
|
||||||
|
|
||||||
public Vector2 Direction;
|
public Vector2 Direction;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using Saltosion.OneWeapon.Player;
|
||||||
|
|
||||||
|
namespace Saltosion.OneWeapon.Guns {
|
||||||
namespace Saltosion.OneWeapon {
|
|
||||||
public class Gun : MonoBehaviour {
|
public class Gun : MonoBehaviour {
|
||||||
|
|
||||||
public Bullet Bullet;
|
public Bullet Bullet;
|
||||||
@ -24,7 +24,7 @@ namespace Saltosion.OneWeapon {
|
|||||||
if (IsHeld) {
|
if (IsHeld) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Player Player = collider.GetComponent<Player>();
|
PlayerController Player = collider.GetComponent<PlayerController>();
|
||||||
if (Player != null) {
|
if (Player != null) {
|
||||||
IsHeld = true;
|
IsHeld = true;
|
||||||
Player.SetGun(this);
|
Player.SetGun(this);
|
||||||
|
@ -1,8 +1,11 @@
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using Saltosion.OneWeapon.Player;
|
||||||
|
using Saltosion.OneWeapon.Enemies;
|
||||||
|
using Saltosion.OneWeapon.Effects;
|
||||||
|
|
||||||
namespace Saltosion.OneWeapon.Bullets {
|
namespace Saltosion.OneWeapon.Guns {
|
||||||
[RequireComponent(typeof(Bullet))]
|
[RequireComponent(typeof(Bullet))]
|
||||||
public class RevolverBullet : MonoBehaviour {
|
public class RevolverBullet : MonoBehaviour {
|
||||||
|
|
||||||
@ -32,7 +35,7 @@ namespace Saltosion.OneWeapon.Bullets {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void OnTriggerEnter2D(Collider2D collider) {
|
void OnTriggerEnter2D(Collider2D collider) {
|
||||||
if (collider.GetComponent<Player>() != null) {
|
if (collider.GetComponent<PlayerController>() != null) {
|
||||||
// don't hit the player!
|
// don't hit the player!
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -4,9 +4,10 @@ using UnityEngine;
|
|||||||
using UnityEngine.Animations;
|
using UnityEngine.Animations;
|
||||||
using Saltosion.OneWeapon.Effects;
|
using Saltosion.OneWeapon.Effects;
|
||||||
using Saltosion.OneWeapon.Utils;
|
using Saltosion.OneWeapon.Utils;
|
||||||
|
using Saltosion.OneWeapon.Guns;
|
||||||
|
|
||||||
namespace Saltosion.OneWeapon {
|
namespace Saltosion.OneWeapon.Player {
|
||||||
public class Player : MonoBehaviour {
|
public class PlayerController : MonoBehaviour {
|
||||||
|
|
||||||
public Rigidbody2D Body;
|
public Rigidbody2D Body;
|
||||||
public Transform Hand;
|
public Transform Hand;
|
@ -3,10 +3,10 @@ using System.Collections.Generic;
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.SceneManagement;
|
using UnityEngine.SceneManagement;
|
||||||
|
|
||||||
namespace Saltosion.OneWeapon {
|
namespace Saltosion.OneWeapon.Player {
|
||||||
public class PlayerFun : MonoBehaviour {
|
public class PlayerFun : MonoBehaviour {
|
||||||
|
|
||||||
public Player Player;
|
public PlayerController Player;
|
||||||
|
|
||||||
public float MaxFun = 100;
|
public float MaxFun = 100;
|
||||||
public float FunDegradeSpeed = 5;
|
public float FunDegradeSpeed = 5;
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using Saltosion.OneWeapon.Enemies;
|
||||||
|
using Saltosion.OneWeapon.Effects;
|
||||||
|
|
||||||
namespace Saltosion.OneWeapon {
|
namespace Saltosion.OneWeapon.Player {
|
||||||
public class PunchingHand : MonoBehaviour {
|
public class PunchingHand : MonoBehaviour {
|
||||||
|
|
||||||
public bool Punching = false;
|
public bool Punching = false;
|
||||||
|
@ -36,4 +36,4 @@ namespace Saltosion.OneWeapon.Utils {
|
|||||||
Bobbing.BobbingMultiplier = SpeedPercentage;
|
Bobbing.BobbingMultiplier = SpeedPercentage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Saltosion.OneWeapon {
|
namespace Saltosion.OneWeapon.Utils {
|
||||||
public class CameraHelper : MonoBehaviour {
|
public class CameraHelper : MonoBehaviour {
|
||||||
public Camera Camera;
|
public Camera Camera;
|
||||||
[Range(1, 4)]
|
[Range(1, 4)]
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
namespace Saltosion.OneWeapon {
|
namespace Saltosion.OneWeapon.Utils {
|
||||||
public class Options {
|
public class Options {
|
||||||
public static bool CensorGore = false;
|
public static bool CensorGore = false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user