// Start is called before the first frame update void Start() { w_Bigbo = GameObject.Find("W_Bigbo").GetComponent <W_Bigbo>(); //뼈다귀 스킬 슬롯 오브젝트 찾기 t = 0; Item_pick = gameObject.AddComponent <AudioSource>(); Item_pick.clip = Item_Sound; Item_pick.volume = 0.6f; Item_pick.loop = false; Item_drop = gameObject.AddComponent <AudioSource>(); Item_drop.clip = Item_drop_Sound; Item_drop.volume = 0.6f; Item_drop.loop = false; Item_drop.Play(); //아이템 생성될때 효과음 재생(스몰톨 죽는 소리) }
// Start is called before the first frame update void Start() { q_Bone = GameObject.Find("Q_Bone").GetComponent <Q_Bone>(); w_Bigbo = GameObject.Find("W_Bigbo").GetComponent <W_Bigbo>(); BoneActive = false; BigboActive = false; //h HPMax = 400; HP = HPMax; hp_bar = GameObject.FindWithTag("DDaengHp"); hpbar_sx = GameObject.FindWithTag("DDaengHp").transform.localScale.x; hpbar_tx = GameObject.FindWithTag("DDaengHp").transform.localPosition.x; hpbar_tmp = hpbar_sx / HPMax; //\ isbig = false; // 초기화 scale = 1f; // 캐릭터의 기본 스케일 1 left = true; // 처음엔 왼쪽을 보고 시작 Ground = GameObject.FindWithTag("Ground"); // 땅바닥 오브젝트 저장 Floor = GameObject.FindGameObjectsWithTag("Floor"); // 계단들의 오브젝트배열 저장 TimeScale = 400.0f; //속도 조정 변수 G = 98f / TimeScale; // 중력 가속도 저장 // G = 98f / TimeScale; Velocityg = 0; // 초기 중력 0 position = gameObject.transform.position; isUp = false; isDown = false; onFloor = false; jump_y = 0; floor = 150; time = 0f; Attack = gameObject.AddComponent <AudioSource>(); Attack.clip = AttackSound; Attack.loop = false; Jump = gameObject.AddComponent <AudioSource>(); Jump.clip = JumpSound; Jump.volume = 0.6f; Jump.loop = false; BigBo = gameObject.AddComponent <AudioSource>(); BigBo.clip = BigBo_Sound; BigBo.volume = 0.6f; BigBo.loop = false; }