コード例 #1
0
 void Awake()
 {
     rb  = GetComponent <Rigidbody>();
     trs = transform;
     startingPosition            = trs.position;
     projector                   = GetComponent <ProjectedPlayer>();
     EndScreen.onRestartClicked += OnRestart;
 }
コード例 #2
0
 private void Awake()
 {
     rb                          = GetComponent <Rigidbody2D>();
     projector                   = GetComponent <ProjectedPlayer>();
     trs                         = transform;
     colliderBounds              = GetComponent <CapsuleCollider2D>().bounds;
     colliderBounds.center       = trs.InverseTransformPoint(colliderBounds.center);
     colliderBounds.size         = trs.InverseTransformVector(colliderBounds.size);
     camOffset                   = cameraTransform.position - trs.position;
     EndScreen.onRestartClicked += OnRestart;
 }
コード例 #3
0
 private void Start()
 {
     projector = player.GetComponent <ProjectedPlayer>();
     trs       = transform;
     playerTrs = player.transform;
 }