public APropGetter(object obj, AProp <object, PropertyType> aProp)
        {
            _obj   = obj;
            _aProp = aProp;

            _aProp.AddOnPropertyChangedHandler(_obj, OnPropChanged);
        }
Exemplo n.º 2
0
    /// <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;
 }
Exemplo n.º 4
0
        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;
 }
Exemplo n.º 9
0
 private static void Set(AProp prop, object[] key, int value)
 {
     prop.set(key, value);
     prop.write();
 }
Exemplo n.º 10
0
 private static int Num(AProp prop, object[] key)
 {
     return(prop.num(key));
 }
Exemplo n.º 11
0
 private static string Get(AProp prop, object[] key)
 {
     return(prop.get(key));
 }
Exemplo n.º 12
0
 private static bool Is(AProp prop, object[] key)
 {
     return(prop.@is(key));
 }
Exemplo n.º 13
0
 private static void Set(AProp prop, object[] key, int value)
 {
     prop.set(key, value);
     prop.write();
 }
Exemplo n.º 14
0
 private static int Num(AProp prop, object[] key)
 {
     return prop.num(key);
 }
Exemplo n.º 15
0
 private static bool Is(AProp prop, object[] key)
 {
     return prop.@is(key);
 }
Exemplo n.º 16
0
 private static string Get(AProp prop, object[] key)
 {
     return prop.get(key);
 }