Beispiel #1
0
    public static TssSdtShort operator ++(TssSdtShort v)
    {
        TssSdtShort @short = new TssSdtShort();

        if (v == null)
        {
            @short.SetValue(1);
            return(@short);
        }
        short num = (short)(v.GetValue() + 1);

        @short.SetValue(num);
        return(@short);
    }
    public static TssSdtShort operator --(TssSdtShort v)
    {
        TssSdtShort tssSdtShort = new TssSdtShort();

        if (v == null)
        {
            tssSdtShort.SetValue(-1);
        }
        else
        {
            short num = v.GetValue();
            num -= 1;
            tssSdtShort.SetValue(num);
        }
        return(tssSdtShort);
    }
Beispiel #3
0
    public static TssSdtShort operator --(TssSdtShort v)
    {
        TssSdtShort tssSdtShort = new TssSdtShort();

        if (object.Equals(v, null))
        {
            short num = 0;
            num -= 1;
            tssSdtShort.SetValue(num);
        }
        else
        {
            short num2 = v.GetValue();
            num2 -= 1;
            tssSdtShort.SetValue(num2);
        }
        return(tssSdtShort);
    }
Beispiel #4
0
 //compile err in Unity3D if we don't override operator--
 public static TssSdtShort operator--(TssSdtShort v)
 {
     TssSdtShort obj = new TssSdtShort();
     if (v == null)
     {
         obj.SetValue(-1);
     }
     else
     {
         short new_v = v.GetValue();
         new_v -= 1;
         obj.SetValue(new_v);
     }
     return obj;
 }
Beispiel #5
0
 //reserver for custom memory pool imp
 public static TssSdtShort NewTssSdtShort()
 {
     TssSdtShort obj = new TssSdtShort();
     obj.m_slot = TssSdtShortSlot.NewSlot(null);
     return obj;
 }