예제 #1
0
파일: Hand.cs 프로젝트: Tioboon/QuarkRush
 private void Start()
 {
     isHoldingNumber         = 999; //Just for check true without bool
     thisRigidBody           = GetComponent <Rigidbody2D>();
     holdingRigidBody        = thisRigidBody;
     _ropeGenerator          = GameObject.Find("RopeGenerator").GetComponent <RopeGenerator>();
     cameraXDis              = Camera.main.orthographicSize / 9 * 16;
     _playerAnimations       = transform.Find("PlayerSprite").GetComponent <PlayerAnimations>();
     _gameController         = GameObject.Find("GameController").GetComponent <GameController>();
     thisRigidBody.velocity += Vector2.right * initialVelocity;
     canvasInGame            = GameObject.Find("CanvasInGame");
     _gameVars       = GameObject.Find("GameController").GetComponent <GameVars>();
     initVelocityMod = velocityMod;
     _soundEmmiter   = Camera.main.transform.Find("Sounds").GetComponent <SoundEmmiter>();
 }
예제 #2
0
 private void Start()
 {
     _hand         = transform.parent.GetComponent <Hand>();
     _gameVars     = GameObject.Find("GameController").GetComponent <GameVars>();
     _soundEmmiter = Camera.main.transform.Find("Sounds").GetComponent <SoundEmmiter>();
 }