예제 #1
0
    // Start is called before the first frame update
    void Start()
    {
        bcam = Camera.main.GetComponent <PlatformerCamera>();

        rb           = GetComponent <Rigidbody2D>();
        speedMax     = speed;
        jumpForceMax = jumpForce;
    }
예제 #2
0
 void                            Start()
 {
     this._controller    = GetComponent <CharacterController>();
     this._cameraCtrl    = this._camera.GetComponent <PlatformerCamera>();
     this._rigidbody     = GetComponent <Rigidbody>();
     this._maxMIVector   = this.transform.position - this._motionIndicator.position;
     this._maxMIVector.y = this._motionIndicator.localPosition.y;
     this._oldGrounded   = this._controller.isGrounded;
 }
예제 #3
0
파일: Player.cs 프로젝트: frms/game-jams
    void Awake()
    {
        rb = GetComponent <Rigidbody2D>();

        CircleCollider2D col = GetComponent <CircleCollider2D>();

        radius = Mathf.Max(transform.localScale.x, transform.localScale.y) * col.radius;

        eye = transform.FindChild("Eye");

        size = new Vector2(2f * radius, 2f * radius);

        cam = Camera.main.GetComponent <PlatformerCamera>();
    }
예제 #4
0
 private void Awake()
 {
     instance = this;
     Height   = Camera.main.orthographicSize * 2;
     Width    = Height * Screen.width / Screen.height;
 }
예제 #5
0
 void                        Start()
 {
     this.cam = Camera.main.GetComponent <PlatformerCamera>();
 }
예제 #6
0
 // Use this for initialization
 void Start()
 {
     _cameraScript = Camera.main.GetComponent <PlatformerCamera> ();
 }
 // Start is called before the first frame update
 void Start()
 {
     bc = Camera.main.GetComponent <PlatformerCamera>();
 }