Weapos Rejiggered

Modified weapon scripts to eliminate specialized projectile behavior - allows charged weapons to have projectiles and modify weapon stats when charged
Added machine gun weapon & VFX
Moved third party code to Plugins folder to improve compile times
This commit is contained in:
Reinier Vens 2021-01-31 03:52:32 +00:00
commit dbc522a224
2105 changed files with 7033 additions and 1141 deletions

View file

@ -0,0 +1,30 @@
using System.Reflection;
using UnityEditor;
using UnityEngine;
namespace NaughtyAttributes.Editor
{
[MethodDrawer(typeof(ButtonAttribute))]
public class ButtonMethodDrawer : MethodDrawer
{
public override void DrawMethod(UnityEngine.Object target, MethodInfo methodInfo)
{
if (methodInfo.GetParameters().Length == 0)
{
ButtonAttribute buttonAttribute = (ButtonAttribute)methodInfo.GetCustomAttributes(typeof(ButtonAttribute), true)[0];
string buttonText = string.IsNullOrEmpty(buttonAttribute.Text) ? methodInfo.Name : buttonAttribute.Text;
if (GUILayout.Button(buttonText))
{
methodInfo.Invoke(target, null);
}
}
else
{
string warning = typeof(ButtonAttribute).Name + " works only on methods with no parameters";
EditorGUILayout.HelpBox(warning, MessageType.Warning);
Debug.LogWarning(warning, target);
}
}
}
}

View file

@ -0,0 +1,13 @@
fileFormatVersion: 2
guid: ad01ec1a22422c6409f913d60ce39d61
timeCreated: 1508592494
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,9 @@
using System.Reflection;
namespace NaughtyAttributes.Editor
{
public abstract class MethodDrawer
{
public abstract void DrawMethod(UnityEngine.Object target, MethodInfo methodInfo);
}
}

View file

@ -0,0 +1,13 @@
fileFormatVersion: 2
guid: a65a1addcdd323249b590f7a06110869
timeCreated: 1508592494
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: