コード例 #1
0
 public void Awake()
 {
     myCollider = GetComponent <Collider2D>();
     GetMaxHeight();
     if (AttachedPlatform != null)
     {
         attachedCollider = AttachedPlatform.GetComponent <Collider2D>();
     }
 }
コード例 #2
0
 void Start()
 {
     platform                 = GetComponentInChildren <PlatformEffector2D>();
     platformCollider         = platform.GetComponent <BoxCollider2D>();
     platformCollider.enabled = false;
     platformTrigger.enabled  = false;
     distJoint                = GetComponent <DistanceJoint2D>();
     distJoint.enabled        = false;
     distJoint.distance       = 0;
     initialPos               = transform.position;
     controller               = GetComponentInParent <ClawController>();
 }
コード例 #3
0
 void Start()
 {
     effector.GetComponent <PlatformEffector2D>();
 }