コード例 #1
0
    public override bool OnSceneView()
    {
        bool flag = base.OnSceneView();

        AuthorChHit.Rep primary   = this.self.primary;
        AuthorChHit.Rep secondary = this.self.secondary;
        AuthorChHit.Rep connect   = new AuthorChHit.Rep();
        AuthorChHit.Rep rep4      = new AuthorChHit.Rep();
        if (this.connect != null)
        {
            connect = this.connect.primary;
            rep4    = this.connect.secondary;
            if (!rep4.valid)
            {
                rep4 = connect;
            }
        }
        if (primary.valid)
        {
            flag |= this.DoTransformHandles(ref primary, ref connect);
        }
        if (secondary.valid)
        {
            flag |= this.DoTransformHandles(ref secondary, ref rep4);
        }
        return(flag);
    }
コード例 #2
0
ファイル: AuthorChHit.cs プロジェクト: sknchan/LegacyRust
        public static void Callback(object userData, string[] options, int selected)
        {
            AuthorChHit authorChHit = userData as AuthorChHit;

            switch (selected)
            {
            case 1:
            {
                authorChHit.AddHingeJoint();
                break;
            }

            case 2:
            {
                authorChHit.AddCharacterJoint();
                break;
            }

            case 3:
            {
                authorChHit.AddFixedJoint();
                break;
            }

            case 4:
            {
                authorChHit.AddSpringJoint();
                break;
            }
            }
        }
コード例 #3
0
ファイル: AuthorChJoint.cs プロジェクト: sknchan/LegacyRust
 internal void InitializeFromOwner(AuthorChHit self, AuthorChJoint.Kind kind)
 {
     this.self = self;
     this.kind = kind;
     AuthorShared.SetDirty(this);
 }