Exemplo n.º 1
0
    // --
    public virtual void OnValidate()
    {
        if (GetDescStruct() == null)
        {
            ResetDescStruct();
        }

        if (sprObject != null)
        {
            CsObject d = CreateDesc();
            if (d != null)
            {
                sprObject.GetDesc(d);
                ApplyDesc(GetDescStruct(), d);
                sprObject.SetDesc(d);
            }
        }
    }
Exemplo n.º 2
0
    // ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
    // MonoBehaviourのメソッド

    // UnityのOnValidate : SprBehaviourのものをオーバーライド
    public override void OnValidate()
    {
        if (GetDescStruct() == null)
        {
            ResetDescStruct();
        }

        if (sprObject != null)
        {
            CsObject d = CreateDesc();
            if (d != null)
            {
                var descStruct = GetDescStruct();

                sprObject.GetDesc(d);
                ApplyDesc(descStruct, d);
                sprObject.SetDesc(d);

                // SetDescとは別に別途設定する必要があるようだ
                (sprObject as CDShapeIf).SetMaterial((descStruct as CDShapeDescStruct).material);
            }
        }
    }
 // -- DescStructをDescに適用する
 public override void ApplyDesc(CsObject from, CsObject to)
 {
     (from as PHSliderJointDescStruct).ApplyTo(to as PHSliderJointDesc);
 }
Exemplo n.º 4
0
 // -- DescStructをDescに適用する
 public override void ApplyDesc(CsObject from, CsObject to)
 {
     (from as CDBoxDescStruct).ApplyTo(to as CDBoxDesc);
 }
Exemplo n.º 5
0
 // -- DescStructをDescに適用する
 public override void ApplyDesc(CsObject from, CsObject to)
 {
     (from as PH1DJointNonLinearMotorDescStruct).ApplyTo(to as PH1DJointNonLinearMotorDesc);
 }
Exemplo n.º 6
0
 // -- DescStructをDescに適用する
 public override void ApplyDesc(CsObject from, CsObject to)
 {
     // (from as HISpidarGDescStruct).ApplyTo(to as HISpidarGDesc);
 }
Exemplo n.º 7
0
 // -- DescStructをDescに適用する
 public override void ApplyDesc(CsObject from, CsObject to)
 {
     (from as PHRootNodeDescStruct).ApplyTo(to as PHRootNodeDesc);
 }
Exemplo n.º 8
0
 // -- DescStructをDescに適用する
 public override void ApplyDesc(CsObject from, CsObject to)
 {
     (from as PHBallJointConeLimitDescStruct).ApplyTo(to as PHBallJointConeLimitDesc);
 }
 // -- DescStructをDescに適用する
 public override void ApplyDesc(CsObject from, CsObject to)
 {
     (from as PHHuman1DJointResistanceDescStruct).ApplyTo(to as PHHuman1DJointResistanceDesc);
 }
 // -- DescStructをDescに適用する
 public override void ApplyDesc(CsObject from, CsObject to)
 {
     (from as PHIKSpringActuatorDescStruct).ApplyTo(to as PHIKSpringActuatorDesc);
 }
Exemplo n.º 11
0
 // -- DescStructをDescに適用する
 public override void ApplyDesc(CsObject from, CsObject to)
 {
     (from as PHIKEndEffectorDescStruct).ApplyTo(to as PHIKEndEffectorDesc);
 }
Exemplo n.º 12
0
 // -- DescStructをDescに適用する
 public abstract void ApplyDesc(CsObject from, CsObject to);
Exemplo n.º 13
0
 public override void ApplyDesc(CsObject from, CsObject to)
 {
     //commented because PHOpObjDescStruct initialization have bug
     //(from as PHOpObjDescStruct).ApplyTo(to as PHOpObjDesc);
 }
Exemplo n.º 14
0
 // -- DescStructをDescに適用する
 public override void ApplyDesc(CsObject from, CsObject to)
 {
     (from as PHHingeJointDescStruct).ApplyTo(to as PHHingeJointDesc);
     (from as PH1DJointDescStruct).ApplyTo(to as PH1DJointDesc);
 }
Exemplo n.º 15
0
 // -- DescStructをDescに適用する
 public override void ApplyDesc(CsObject from, CsObject to)
 {
     // Verticesには代入できないしすべきでないので、Materialだけを適用する
     (from as CDConvexMeshDescStruct).material.ApplyTo((to as CDConvexMeshDesc).material);
 }