// Start is called before the first frame update void Start() { bcam = Camera.main.GetComponent <PlatformerCamera>(); rb = GetComponent <Rigidbody2D>(); speedMax = speed; jumpForceMax = jumpForce; }
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; }
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>(); }
private void Awake() { instance = this; Height = Camera.main.orthographicSize * 2; Width = Height * Screen.width / Screen.height; }
void Start() { this.cam = Camera.main.GetComponent <PlatformerCamera>(); }
// 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>(); }