
commit bb3be793ca5db3df43679f2d6c34c75f768047a1 Author: SAIPO <grasste0403@hotmail.com> Date: Wed Dec 22 07:46:07 2021 +0800 修改佛教Boss关卡和伊斯兰Boss关卡的粒子特效 commit 1987a63954402be8894f9cc9805545432afefa18 Author: SAIPO <grasste0403@hotmail.com> Date: Tue Dec 21 20:55:05 2021 +0800 任务:编写shader,完善数据库类 1.完善了PlayerInfo类,用以数据库功能 1) 编写GetSqlData()函数,使用多线程获取用户信息,使用前请先设置公关变量name。 2) 编写CreateUser(string username)函数,在用户表内创建一个用户。 3) 编写hasName(string _searchName)函数,判断是否存在这个用户。 4) 编写GetBoardInfo(int WorldId)函数,获取指定世界的留言板链表。 5) 编写GetDeadInfo(int WorldId)函数,获取指定世界的死亡信息链表。 6) 编写CreateDead(int WorldId, Vector2 postion)函数,创建一条死亡信息。 7) 编写CreateBoard(int WorldId, Vector2 postion,string text)函数,创建一条留言信息。 8) 编写UpdatePlayerInfo()函数,将类里储存的信息上传到数据库。 2.实装相关Shader 1)完善以撒关卡的屏幕后特效,使其可以在发怒场景发出红色辉光。 2)完善以撒鬼魂的粒子,并且颜色和发怒与否关联。 3)实装以撒关卡的窗户辉光效果。 4)实装伊斯兰Boss关卡炸弹弹反的粒子特效。 5)实装伊斯兰Boss关卡的尘土特效(需要重做) 6)实装佛教Boss关卡的敲钟声波特效。 7)实装佛教Boss关卡的钟声受击灰尘(需要重做) 3.目前发现的bug 1)当人物恰好调到角落里会卡动画。 2)伊斯兰Boss关卡,特洛伊木马吐出的炸弹落到特效小怪上会闪退。 commit c06b842382051bc260d9f509491c683a41ca2a4c Author: SAIPO <grasste0403@hotmail.com> Date: Tue Dec 21 14:08:06 2021 +0800 Squashed commit of the following: commit e7dcdec1d9913e283f42d42f72f1030f0c8b6fda Author: Roman <1325980292@qq.com> Date: Tue Dec 21 00:45:50 2021 +0800 任务:搭建前置关卡,编写演出逻辑 1.流程化游戏 (1.制作转移器,内含字典,根据玩家的静态属性“阶段”来决定到转移点后将会移动到哪一个场景 (2.制作转场器,水平方向从左到右 下班 commit 74f926815ec8d00fa051192eb3b978ff4b3c01a6 Author: Roman <1325980292@qq.com> Date: Mon Dec 20 23:33:14 2021 +0800 任务:搭建前置关卡,编写演出逻辑 1.编写基督前置关卡 (1.放置平台、怪物和男童 (2.修改男童类,外加OnSaveEvent,OnSave时若有事件则触发该Event (3.编写开幕演出,与yi前置类似 (4.编写男童解救演出 ((1.触发Fungus对话 ((2.对话结束后,开启通往上层的门 2.搭建村场景 (1.放置平台和元素 (2.为可动元素制作动画 3.为玩家添加static属性,进度。0:刚开,1进村,2通佛,3通伊,4.通基 4.制作死亡重开功能 (1.当玩家生命值降到0及以下,触发死亡事件 (2.死亡后reload当前场景,并设记录员,关闭某些事件和演出不再执行 *优化和修复 (1.尝试制作击中卡肉效果,目前打击感太弱。也可以尝试粒子效果 *至此,全部前置关卡搭建完毕,村场景搭建完毕。 *明天可以完成流程化,接下来就是填充剧情、UI、死亡标记和留言板等系统了 下班 commit f257b40d10373a13380e9c395fe94d6559a82a0f Author: Roman <1325980292@qq.com> Date: Sun Dec 19 23:57:44 2021 +0800 任务:搭建前置关卡,编写演出逻辑 1.编写佛教前置关开场演出 (*.休整地形,使得左边多出一块地面,方便演出正常运作 (*.项目后期再通过逻辑触发该演出,目前先用调试方式触发演出 (1.关闭空气墙 (2.修改玩家inputDir使玩家从屏幕外冲进到屏幕内部 (3.等待一段时间 (4.此时玩家应该走到某个合适的位置,停止玩家的inputDir (5.等待一小段时间给玩家反应 (6.修改相机offset,使其对准对话的两个小怪 (7.等待一小段时间给玩家反应 (8.触发Fungus对话 (9.Fungus对话结束后,返回标记命令演出Main继续执行 *.修改NormalEnemy,添加标识isInFoStage,在Update中判断,若是,使该怪物水平方向上追踪玩家,可以参考爱欲品的Seek (10.修改左边小怪的isInFoStage (11.开启右边小怪的Path动画,表现其慌忙逃跑 (12.Invoke一个延时,等右边小怪逃出视野后删除它 (13.触发善后和结束事件 (14.重写善后事件,重新开启空气墙 2.搭建伊斯兰前置关卡 3.创建伊斯兰前置关卡演出 (1.关闭空气墙 (2.修改玩家inputDir使玩家从屏幕外冲进到屏幕内部 (3.等待一段时间 (4.此时玩家应该走到某个合适的位置,停止玩家的inputDir (5.等待一小段时间给玩家反应 (6.触发善后与结束事件 4.创建玩家隔间触发事件 (1.是进入式触发器对象 (2.触发时Call隔间演出 5.编写隔间演出逻辑 (1.表现关门 (2.左右晃一下镜头,中心移动到左右门处,表示门被关闭 (3.镜头回到玩家处,同时压缩相机可移动范围更窄 (4.打开隔间墙壁的空气墙 (5.设置EndEvent为伊斯兰事件 6.编写召唤伊斯兰事件 (1.摘自木马的召唤攻击,稍作修改 (2.当召唤的伊斯兰全部挂了,触发隔间结束事件 7.编写隔间结束事件 (1.表现开门 (2.关闭隔间的空气墙 (3.重设相机移动范围 8.搭建基督前置关卡 *.至此,第一关、第二关前置关卡的逻辑基本开发完毕 *.明天能做完所有前置关,顺便应该能搭完村场景,后天可以开始搭建新系统,目前还差留言、死亡标记等系统等待编写 下班 commit cd22966ad7637a84c0f08c3a716d5ec549699749 Author: Roman <1325980292@qq.com> Date: Sun Dec 19 14:12:05 2021 +0800 Squashed commit of the following: commit 26aff356971bdc2c2a6a3bd444eeb50c4bf7ec14 Author: SAIPO <grasste0403@hotmail.com> Date: Sun Dec 19 02:20:44 2021 +0800 导入近期制作的一些Shader 1.合并分支 2.完成了人物描边的流动shader制作,并且可以对Bloom屏幕后处理产生反应。 3.完成了基督教boss关卡,彩色窗户辉光的shader制作,可以对Bloom产生反应。 4.完成了伊斯兰教弹反的炸弹拖尾粒子shader的制作。 5.完成了火焰粒子shader的制作(可以用在基督教的以撒鬼魂上)。 6.完成了灰尘粒子像素化的shader制作。 7.完成了边缘扭曲的shader制作,可以用在一些树木上,让画面产生动感。 明天制作敲钟的声波Shader # Conflicts: # UserSettings/EditorUserSettings.asset commit 26aff356971bdc2c2a6a3bd444eeb50c4bf7ec14 Author: SAIPO <grasste0403@hotmail.com> Date: Sun Dec 19 02:20:44 2021 +0800 导入近期制作的一些Shader 1.合并分支 2.完成了人物描边的流动shader制作,并且可以对Bloom屏幕后处理产生反应。 3.完成了基督教boss关卡,彩色窗户辉光的shader制作,可以对Bloom产生反应。 4.完成了伊斯兰教弹反的炸弹拖尾粒子shader的制作。 5.完成了火焰粒子shader的制作(可以用在基督教的以撒鬼魂上)。 6.完成了灰尘粒子像素化的shader制作。 7.完成了边缘扭曲的shader制作,可以用在一些树木上,让画面产生动感。 明天制作敲钟的声波Shader # Conflicts: # Assets/Scenes/TeLuoYiStageTest.unity # Assets/Shader/火焰粒子shader/particle.shadergraph # Assets/Shader/灰尘粒子用shader/Pixel_My.shader # Assets/Shader/灰尘粒子用shader/Unlit_Pixel_My 1.mat # Assets/Shader/灰尘粒子用shader/Unlit_Pixel_My 2.mat # Assets/Shader/灰尘粒子用shader/Unlit_Pixel_My.mat # Logs/ApiUpdaterCheck.txt # UserSettings/EditorUserSettings.asset
607 lines
13 KiB
C#
607 lines
13 KiB
C#
// Amplify Shader Editor - Visual Shader Editing Tool
|
|
// Copyright (c) Amplify Creations, Lda <info@amplify.pt>
|
|
|
|
using UnityEngine;
|
|
using UnityEditor;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
namespace AmplifyShaderEditor
|
|
{
|
|
public enum WirePortDataType
|
|
{
|
|
OBJECT = 1 << 1,
|
|
FLOAT = 1 << 2,
|
|
FLOAT2 = 1 << 3,
|
|
FLOAT3 = 1 << 4,
|
|
FLOAT4 = 1 << 5,
|
|
FLOAT3x3 = 1 << 6,
|
|
FLOAT4x4 = 1 << 7,
|
|
COLOR = 1 << 8,
|
|
INT = 1 << 9,
|
|
SAMPLER1D = 1 << 10,
|
|
SAMPLER2D = 1 << 11,
|
|
SAMPLER3D = 1 << 12,
|
|
SAMPLERCUBE = 1 << 13,
|
|
UINT = 1 << 14,
|
|
SAMPLER2DARRAY = 1 << 15,
|
|
SAMPLERSTATE = 1 << 16,
|
|
UINT4 = 1 << 17
|
|
}
|
|
|
|
public enum VariableQualifiers
|
|
{
|
|
In = 0,
|
|
Out,
|
|
InOut
|
|
}
|
|
|
|
public struct WirePortDataTypeComparer : IEqualityComparer<WirePortDataType>
|
|
{
|
|
public bool Equals( WirePortDataType x, WirePortDataType y )
|
|
{
|
|
return x == y;
|
|
}
|
|
|
|
public int GetHashCode( WirePortDataType obj )
|
|
{
|
|
// you need to do some thinking here,
|
|
return (int)obj;
|
|
}
|
|
}
|
|
|
|
[System.Serializable]
|
|
public class WirePort
|
|
{
|
|
private const double PortClickTime = 0.2;
|
|
|
|
private double m_lastTimeClicked = -1;
|
|
|
|
private Vector2 m_labelSize;
|
|
private Vector2 m_unscaledLabelSize;
|
|
protected bool m_dirtyLabelSize = true;
|
|
|
|
private bool m_isEditable = false;
|
|
private bool m_editingName = false;
|
|
|
|
protected int m_portRestrictions = 0;
|
|
|
|
private bool m_repeatButtonState = false;
|
|
|
|
[SerializeField]
|
|
private Rect m_position;
|
|
|
|
[SerializeField]
|
|
private Rect m_labelPosition;
|
|
|
|
[SerializeField]
|
|
protected int m_nodeId = -1;
|
|
|
|
[SerializeField]
|
|
protected int m_portId = -1;
|
|
|
|
[SerializeField]
|
|
protected int m_orderId = -1;
|
|
|
|
[SerializeField]
|
|
protected WirePortDataType m_dataType = WirePortDataType.FLOAT;
|
|
|
|
[SerializeField]
|
|
protected string m_name;
|
|
|
|
[SerializeField]
|
|
protected List<WireReference> m_externalReferences;
|
|
|
|
[SerializeField]
|
|
protected bool m_locked = false;
|
|
|
|
[SerializeField]
|
|
protected bool m_visible = true;
|
|
|
|
[SerializeField]
|
|
protected bool m_isDummy = false;
|
|
|
|
[SerializeField]
|
|
protected bool m_hasCustomColor = false;
|
|
|
|
[SerializeField]
|
|
protected Color m_customColor = Color.white;
|
|
|
|
[SerializeField]
|
|
protected Rect m_activePortArea;
|
|
|
|
public WirePort( int nodeId, int portId, WirePortDataType dataType, string name, int orderId = -1 )
|
|
{
|
|
m_nodeId = nodeId;
|
|
m_portId = portId;
|
|
m_orderId = orderId;
|
|
m_dataType = dataType;
|
|
m_name = name;
|
|
m_externalReferences = new List<WireReference>();
|
|
}
|
|
|
|
public virtual void Destroy()
|
|
{
|
|
m_externalReferences.Clear();
|
|
m_externalReferences = null;
|
|
}
|
|
|
|
public void SetFreeForAll()
|
|
{
|
|
m_portRestrictions = -1;
|
|
}
|
|
|
|
public void AddPortForbiddenTypes( params WirePortDataType[] forbiddenTypes )
|
|
{
|
|
if( forbiddenTypes != null )
|
|
{
|
|
if( m_portRestrictions == 0 )
|
|
{
|
|
//if no previous restrictions are detected then we set up the bit array so we can set is bit correctly
|
|
m_portRestrictions = int.MaxValue;
|
|
}
|
|
|
|
for( int i = 0; i < forbiddenTypes.Length; i++ )
|
|
{
|
|
m_portRestrictions = m_portRestrictions & ( int.MaxValue - (int)forbiddenTypes[ i ] );
|
|
}
|
|
}
|
|
}
|
|
|
|
public void AddPortRestrictions( params WirePortDataType[] validTypes )
|
|
{
|
|
if( validTypes != null )
|
|
{
|
|
for( int i = 0; i < validTypes.Length; i++ )
|
|
{
|
|
m_portRestrictions = m_portRestrictions | (int)validTypes[ i ];
|
|
}
|
|
}
|
|
}
|
|
|
|
public void CreatePortRestrictions( params WirePortDataType[] validTypes )
|
|
{
|
|
m_portRestrictions = 0;
|
|
if( validTypes != null )
|
|
{
|
|
for( int i = 0; i < validTypes.Length; i++ )
|
|
{
|
|
m_portRestrictions = m_portRestrictions | (int)validTypes[ i ];
|
|
}
|
|
}
|
|
}
|
|
|
|
public virtual bool CheckValidType( WirePortDataType dataType )
|
|
{
|
|
if( m_portRestrictions == 0 )
|
|
{
|
|
return true;
|
|
}
|
|
|
|
return ( m_portRestrictions & (int)dataType ) != 0;
|
|
}
|
|
|
|
public bool ConnectTo( WireReference port )
|
|
{
|
|
if( m_locked )
|
|
return false;
|
|
|
|
if( m_externalReferences.Contains( port ) )
|
|
return false;
|
|
|
|
m_externalReferences.Add( port );
|
|
return true;
|
|
}
|
|
|
|
public bool ConnectTo( int nodeId, int portId )
|
|
{
|
|
if( m_locked )
|
|
return false;
|
|
|
|
|
|
foreach( WireReference reference in m_externalReferences )
|
|
{
|
|
if( reference.NodeId == nodeId && reference.PortId == portId )
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
m_externalReferences.Add( new WireReference( nodeId, portId, m_dataType, false ) );
|
|
return true;
|
|
}
|
|
|
|
public bool ConnectTo( int nodeId, int portId, WirePortDataType dataType, bool typeLocked )
|
|
{
|
|
if( m_locked )
|
|
return false;
|
|
|
|
foreach( WireReference reference in m_externalReferences )
|
|
{
|
|
if( reference.NodeId == nodeId && reference.PortId == portId )
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
m_externalReferences.Add( new WireReference( nodeId, portId, dataType, typeLocked ) );
|
|
return true;
|
|
}
|
|
|
|
public void DummyAdd( int nodeId, int portId )
|
|
{
|
|
m_externalReferences.Insert( 0, new WireReference( nodeId, portId, WirePortDataType.OBJECT, false ) );
|
|
m_isDummy = true;
|
|
}
|
|
|
|
public void DummyRemove()
|
|
{
|
|
m_externalReferences.RemoveAt( 0 );
|
|
m_isDummy = false;
|
|
}
|
|
|
|
public void DummyClear()
|
|
{
|
|
m_externalReferences.Clear();
|
|
m_isDummy = false;
|
|
}
|
|
|
|
public WireReference GetConnection( int connID = 0 )
|
|
{
|
|
if( connID < m_externalReferences.Count )
|
|
return m_externalReferences[ connID ];
|
|
return null;
|
|
}
|
|
|
|
public void ChangeProperties( string newName, WirePortDataType newType, bool invalidateConnections )
|
|
{
|
|
Name = newName;
|
|
ChangeType( newType, invalidateConnections );
|
|
//if ( m_dataType != newType )
|
|
//{
|
|
// DataType = newType;
|
|
// if ( invalidateConnections )
|
|
// {
|
|
// InvalidateAllConnections();
|
|
// }
|
|
// else
|
|
// {
|
|
// NotifyExternalRefencesOnChange();
|
|
// }
|
|
//}
|
|
}
|
|
|
|
public void ChangeType( WirePortDataType newType, bool invalidateConnections )
|
|
{
|
|
if( m_dataType != newType )
|
|
{
|
|
//ParentNode node = UIUtils.GetNode( m_nodeId );
|
|
//if ( node )
|
|
//{
|
|
// Undo.RegisterCompleteObjectUndo( node.ContainerGraph.ParentWindow, Constants.UndoChangeTypeNodesId );
|
|
// Undo.RecordObject( node, Constants.UndoChangeTypeNodesId );
|
|
//}
|
|
DataType = newType;
|
|
if( invalidateConnections )
|
|
{
|
|
InvalidateAllConnections();
|
|
}
|
|
else
|
|
{
|
|
NotifyExternalRefencesOnChange();
|
|
}
|
|
}
|
|
}
|
|
|
|
public virtual void ChangePortId( int newId ) { }
|
|
public virtual void NotifyExternalRefencesOnChange() { }
|
|
|
|
public void UpdateInfoOnExternalConn( int nodeId, int portId, WirePortDataType type )
|
|
{
|
|
for( int i = 0; i < m_externalReferences.Count; i++ )
|
|
{
|
|
if( m_externalReferences[ i ].NodeId == nodeId && m_externalReferences[ i ].PortId == portId )
|
|
{
|
|
m_externalReferences[ i ].DataType = type;
|
|
}
|
|
}
|
|
}
|
|
|
|
public void InvalidateConnection( int nodeId, int portId )
|
|
{
|
|
int id = -1;
|
|
for( int i = 0; i < m_externalReferences.Count; i++ )
|
|
{
|
|
if( m_externalReferences[ i ].NodeId == nodeId && m_externalReferences[ i ].PortId == portId )
|
|
{
|
|
id = i;
|
|
break;
|
|
}
|
|
}
|
|
|
|
if( id > -1 )
|
|
m_externalReferences.RemoveAt( id );
|
|
}
|
|
|
|
public void RemoveInvalidConnections()
|
|
{
|
|
Debug.Log( "Cleaning invalid connections" );
|
|
List<WireReference> validConnections = new List<WireReference>();
|
|
for( int i = 0; i < m_externalReferences.Count; i++ )
|
|
{
|
|
if( m_externalReferences[ i ].IsValid )
|
|
{
|
|
validConnections.Add( m_externalReferences[ i ] );
|
|
}
|
|
else
|
|
{
|
|
Debug.Log( "Detected invalid connection on node " + m_nodeId + " port " + m_portId );
|
|
}
|
|
}
|
|
m_externalReferences.Clear();
|
|
m_externalReferences = validConnections;
|
|
}
|
|
|
|
public void InvalidateAllConnections()
|
|
{
|
|
m_externalReferences.Clear();
|
|
}
|
|
|
|
public virtual void FullDeleteConnections() { }
|
|
|
|
public bool IsConnectedTo( int nodeId, int portId )
|
|
{
|
|
if( m_locked )
|
|
return false;
|
|
|
|
for( int i = 0; i < m_externalReferences.Count; i++ )
|
|
{
|
|
if( m_externalReferences[ i ].NodeId == nodeId && m_externalReferences[ i ].PortId == portId )
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
public WirePortDataType ConnectionType( int id = 0 )
|
|
{
|
|
return ( id < m_externalReferences.Count ) ? m_externalReferences[ id ].DataType : DataType;
|
|
}
|
|
|
|
public bool CheckMatchConnectionType( int id = 0 )
|
|
{
|
|
if( id < m_externalReferences.Count )
|
|
return m_externalReferences[ id ].DataType == DataType;
|
|
|
|
return false;
|
|
}
|
|
|
|
public void MatchPortToConnection( int id = 0 )
|
|
{
|
|
if( id < m_externalReferences.Count )
|
|
{
|
|
DataType = m_externalReferences[ id ].DataType;
|
|
}
|
|
}
|
|
|
|
public void ResetWireReferenceStatus()
|
|
{
|
|
for( int i = 0; i < m_externalReferences.Count; i++ )
|
|
{
|
|
m_externalReferences[ i ].WireStatus = WireStatus.Default;
|
|
}
|
|
}
|
|
|
|
public bool InsideActiveArea( Vector2 pos )
|
|
{
|
|
return m_activePortArea.Contains( pos );
|
|
}
|
|
|
|
public void Click()
|
|
{
|
|
if( m_isEditable )
|
|
{
|
|
if( ( EditorApplication.timeSinceStartup - m_lastTimeClicked ) < PortClickTime )
|
|
{
|
|
m_editingName = true;
|
|
GUI.FocusControl( "port" + m_nodeId.ToString() + m_portId.ToString() );
|
|
TextEditor te = (TextEditor)GUIUtility.GetStateObject( typeof( TextEditor ), GUIUtility.keyboardControl );
|
|
if( te != null )
|
|
{
|
|
te.SelectAll();
|
|
}
|
|
}
|
|
|
|
m_lastTimeClicked = EditorApplication.timeSinceStartup;
|
|
}
|
|
}
|
|
|
|
public bool Draw( Rect textPos, GUIStyle style )
|
|
{
|
|
bool changeFlag = false;
|
|
if( m_isEditable && m_editingName )
|
|
{
|
|
textPos.width = m_labelSize.x;
|
|
EditorGUI.BeginChangeCheck();
|
|
GUI.SetNextControlName( "port" + m_nodeId.ToString() + m_portId.ToString() );
|
|
m_name = GUI.TextField( textPos, m_name, style );
|
|
if( EditorGUI.EndChangeCheck() )
|
|
{
|
|
m_dirtyLabelSize = true;
|
|
changeFlag = true;
|
|
}
|
|
|
|
if( Event.current.isKey && ( Event.current.keyCode == KeyCode.Return || Event.current.keyCode == KeyCode.KeypadEnter ) )
|
|
{
|
|
m_editingName = false;
|
|
GUIUtility.keyboardControl = 0;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
GUI.Label( textPos, m_name, style );
|
|
}
|
|
//GUI.Label( textPos, string.Empty );
|
|
return changeFlag;
|
|
}
|
|
|
|
public void ResetEditing()
|
|
{
|
|
m_editingName = false;
|
|
}
|
|
|
|
public virtual void ForceClearConnection() { }
|
|
|
|
public bool IsConnected
|
|
{
|
|
get { return ( m_externalReferences.Count > 0 && !m_locked ); }
|
|
}
|
|
|
|
public List<WireReference> ExternalReferences
|
|
{
|
|
get { return m_externalReferences; }
|
|
}
|
|
|
|
public int ConnectionCount
|
|
{
|
|
get { return m_externalReferences.Count; }
|
|
}
|
|
|
|
public Rect Position
|
|
{
|
|
get { return m_position; }
|
|
set { m_position = value; }
|
|
}
|
|
|
|
public Rect LabelPosition
|
|
{
|
|
get { return m_labelPosition; }
|
|
set { m_labelPosition = value; }
|
|
}
|
|
|
|
public int PortId
|
|
{
|
|
get { return m_portId; }
|
|
set { m_portId = value; }
|
|
}
|
|
|
|
public int OrderId
|
|
{
|
|
get { return m_orderId; }
|
|
set { m_orderId = value; }
|
|
}
|
|
|
|
|
|
public int NodeId
|
|
{
|
|
get { return m_nodeId; }
|
|
set { m_nodeId = value; }
|
|
}
|
|
|
|
public virtual WirePortDataType DataType
|
|
{
|
|
get { return m_dataType; }
|
|
set { m_dataType = value; }
|
|
}
|
|
|
|
public bool Visible
|
|
{
|
|
get { return m_visible; }
|
|
set
|
|
{
|
|
m_visible = value;
|
|
if( !m_visible && IsConnected )
|
|
{
|
|
ForceClearConnection();
|
|
}
|
|
}
|
|
}
|
|
|
|
public bool Locked
|
|
{
|
|
get { return m_locked; }
|
|
set
|
|
{
|
|
//if ( m_locked && IsConnected )
|
|
//{
|
|
// ForceClearConnection();
|
|
//}
|
|
m_locked = value;
|
|
}
|
|
}
|
|
|
|
public virtual string Name
|
|
{
|
|
get { return m_name; }
|
|
set { m_name = value; m_dirtyLabelSize = true; }
|
|
}
|
|
|
|
public bool DirtyLabelSize
|
|
{
|
|
get { return m_dirtyLabelSize; }
|
|
set { m_dirtyLabelSize = value; }
|
|
}
|
|
|
|
public bool HasCustomColor
|
|
{
|
|
get { return m_hasCustomColor; }
|
|
}
|
|
|
|
public Color CustomColor
|
|
{
|
|
get { return m_customColor; }
|
|
set
|
|
{
|
|
m_hasCustomColor = true;
|
|
m_customColor = value;
|
|
}
|
|
}
|
|
|
|
public Rect ActivePortArea
|
|
{
|
|
get { return m_activePortArea; }
|
|
set { m_activePortArea = value; }
|
|
}
|
|
|
|
public Vector2 LabelSize
|
|
{
|
|
get { return m_labelSize; }
|
|
set { m_labelSize = value; }
|
|
}
|
|
|
|
public Vector2 UnscaledLabelSize
|
|
{
|
|
get { return m_unscaledLabelSize; }
|
|
set { m_unscaledLabelSize = value; }
|
|
}
|
|
|
|
public bool IsEditable
|
|
{
|
|
get { return m_isEditable; }
|
|
set { m_isEditable = value; }
|
|
}
|
|
|
|
public bool Available { get { return m_visible && !m_locked; } }
|
|
public override string ToString()
|
|
{
|
|
string dump = "";
|
|
dump += "Order: " + m_orderId + "\n";
|
|
dump += "Name: " + m_name + "\n";
|
|
dump += " Type: " + m_dataType;
|
|
dump += " NodeId : " + m_nodeId;
|
|
dump += " PortId : " + m_portId;
|
|
dump += "\nConnections:\n";
|
|
foreach( WireReference wirePort in m_externalReferences )
|
|
{
|
|
dump += wirePort + "\n";
|
|
}
|
|
return dump;
|
|
}
|
|
|
|
public bool RepeatButtonState
|
|
{
|
|
get { return m_repeatButtonState; }
|
|
set { m_repeatButtonState = value; }
|
|
}
|
|
public bool IsDummy { get { return m_isDummy; } }
|
|
public bool NotFreeForAllTypes { get { return m_portRestrictions != -1; } }
|
|
}
|
|
}
|