void Start() { //오브젝트 받아오기 rb = GetComponent <Rigidbody2D>(); bottleGenerator = GameObject.Find("BottleManager").GetComponent <BottleGenerator>(); player = GameObject.Find("Player"); bottleSelectController = GameObject.Find("BottleManager").GetComponent <BottleSelectController>(); playerImageController = player.GetComponent <PlayerImageController>(); padStrength = GameObject.Find("Pad_Strength").GetComponent <PadStrength>(); padDirection = GameObject.Find("Joystick").GetComponent <PadDirection>(); trajectoryLine = GameObject.Find("Trajectory").GetComponent <TrajectoryLine>(); transparent = GetComponent <SpriteRenderer>(); // 물병의 스프라이트 렌더러(투명도) tensionGaugeManager = GameObject.Find("Image_TensionGaugeBar").GetComponent <TensionGaugeManager>(); controllButtonsUIManager = GameObject.Find("UIManager").GetComponent <ControllButtonsUIManager>(); usefullOperation = GameObject.Find("GameResource").GetComponent <UsefullOperation>(); screenEffectController = GameObject.Find("Main Camera").GetComponent <ScreenEffectController>();; //값 초기화 rb.gravityScale = 0; transform.position = playerImageController.getBottlePosition(); isSuperPowerAvailabe = false; //물병에 초능력을 적용할 수 있는지의 여부 isStanding = false; onFloor = false; standingBySkill = false; rotateSpeed = 0.8f; //회전속도 delta = 0; destroyDelay = 1; standingDelay = 2; padStrengthTouched = false; padDirectionTouched = false; tensionGaugeUp = true; isDestroying = false; standBottle = false; }
void Start() { bottleSelectController = GameObject.Find("BottleManager").GetComponent <BottleSelectController>(); bottleGenerator = GameObject.Find("BottleManager").GetComponent <BottleGenerator>(); padStrength = GameObject.Find("Pad_Strength").GetComponent <PadStrength>(); bottleController = GameObject.FindWithTag("isActBottle").GetComponent <BottleController>(); //NEW: 처음에 시작할 때 태그로 찾아줘야 함 thisBottleCollision = gameObject.GetComponent <BottleCollision>(); usefullOperation = GameObject.Find("GameResource").GetComponent <UsefullOperation>(); redAura = transform.Find("RedAura").gameObject; freezeRange = transform.Find("FreezeRange").gameObject; screenEffectController = GameObject.Find("Main Camera").GetComponent <ScreenEffectController>(); psychokinesis = GameObject.Find("Player").GetComponent <Psychokinesis>(); bottleChain.Add(thisBottleCollision); //체인과 같이 연속적으로 이어진 물병들의 리스트에는 자신도 포함한다 }
// Use this for initialization void Start() { //platformWidth = platform.GetComponentInChildren<BoxCollider2D>().size.x; platformsWidths = new float[objectPools.Length]; for (int i = 0; i < objectPools.Length; i++) { platformsWidths[i] = objectPools[i].pooledObject.GetComponentInChildren <BoxCollider2D>().size.x; } minHeight = transform.position.y; maxHeight = maxHeightPoint.position.y; bottleGenerator = FindObjectOfType <BottleGenerator>(); civilianGenerator = FindObjectOfType <CivilianGenerator>(); }