
1.实现挥动锤子功能 (1.有一个挥动过程(DoTween) (2.判定随着锤子挥动动画进行 (3.挥动起始锤子显现 (4.挥动结束锤子消失 (5.CD之内无法再次挥动(不作反应 (6.挥动过程只能进行UI操作 (7.目前判定范围用sprite表示 (8.只有挥动动画时间内有攻击判定 2.引入Odin插件
42 lines
1.2 KiB
C#
42 lines
1.2 KiB
C#
//-----------------------------------------------------------------------
|
|
// <copyright file="SyncVarAttributeDrawer.cs" company="Sirenix IVS">
|
|
// Copyright (c) Sirenix IVS. All rights reserved.
|
|
// </copyright>
|
|
//-----------------------------------------------------------------------
|
|
|
|
#if UNITY_EDITOR && !UNITY_2019_1_OR_NEWER
|
|
#pragma warning disable 0618
|
|
|
|
namespace Sirenix.OdinInspector.Editor.Drawers
|
|
{
|
|
using Sirenix.Utilities;
|
|
using UnityEditor;
|
|
using UnityEngine;
|
|
using UnityEngine.Networking;
|
|
|
|
/// <summary>
|
|
/// SyncVar attribute drawer.
|
|
/// </summary>
|
|
public class SyncVarAttributeDrawer : OdinAttributeDrawer<SyncVarAttribute>
|
|
{
|
|
/// <summary>
|
|
/// Draws the property.
|
|
/// </summary>
|
|
protected override void DrawPropertyLayout(GUIContent label)
|
|
{
|
|
GUILayout.BeginHorizontal();
|
|
{
|
|
GUILayout.BeginVertical();
|
|
{
|
|
this.CallNextDrawer(label);
|
|
}
|
|
GUILayout.EndVertical();
|
|
|
|
GUILayout.Label("SyncVar", EditorStyles.miniLabel, GUILayoutOptions.Width(52f));
|
|
}
|
|
GUILayout.EndHorizontal();
|
|
}
|
|
}
|
|
}
|
|
|
|
#endif // UNITY_EDITOR && !UNITY_2019_1_OR_NEWER |