public APropGetter(object obj, AProp <object, PropertyType> aProp) { _obj = obj; _aProp = aProp; _aProp.AddOnPropertyChangedHandler(_obj, OnPropChanged); }
/// <summary> /// 碰到板子 /// </summary> /// <param name="stopPos"></param> /// <param name="hit"></param> void HitBoard(Vector3 stopPos, Transform hit) { if (m_CanDamageNextBoard) { VictoryBoard board = hit.GetComponent <VictoryBoard>(); if (null == board) { foreach (var item in m_ObstacleGroups) { if (item.HaveBoard(hit)) { item.Broken(); break; } } m_CanDamageNextBoard = false; m_FallTime = 0; HelixEffectMgr.S.StopMaxSpeedFall(); } else { board.Trigger(); IsDown = false; SlinkysTrans.position = stopPos; } } else { if (MaxSpeedStateTime > 0)//无敌状态 破坏掉 { foreach (var item in m_ObstacleGroups) { if (item.HaveBoard(hit)) { item.Broken(); break; } } } else { IsDown = false; SlinkysTrans.position = stopPos; AProp prop = hit.GetComponent <AProp>(); if (null == prop) { StartUp(); } else { prop.Trigger(); if (prop is Board_Obstacle) { StartUp(); } } } } }
public APropWithDefaultGetter ( AProp <object, PropertyType> aProp, PropertyType defaultValue = default(PropertyType) ) : base(defaultValue) { _aProp = aProp; }
public static T Combine <T>(T A, T B) { foreach (PropertyInfo AProp in A.GetType().GetProperties()) { if (AProp.GetValue(A) == null) { PropertyInfo BProp = B.GetType().GetProperty(AProp.Name); AProp.SetValue(A, BProp.GetValue(B)); } } return(A); }
void Init(AProp <object, PropertyType> aProp) { _aProp = aProp; }
public APropSetter(object obj, AProp <object, PropertyType> aProp) : base(obj) { Init(aProp); }
public APropSetter(AProp <object, PropertyType> aProp) : base() { Init(aProp); }
public APropBindingPathLink(AProp <object, PropertyType> aProp) : base(PropertyKind.AProperty) { TheAProp = aProp; }
private static void Set(AProp prop, object[] key, int value) { prop.set(key, value); prop.write(); }
private static int Num(AProp prop, object[] key) { return(prop.num(key)); }
private static string Get(AProp prop, object[] key) { return(prop.get(key)); }
private static bool Is(AProp prop, object[] key) { return(prop.@is(key)); }
private static int Num(AProp prop, object[] key) { return prop.num(key); }
private static bool Is(AProp prop, object[] key) { return prop.@is(key); }
private static string Get(AProp prop, object[] key) { return prop.get(key); }