void Start() { anim = GetComponent <Animator> (); pl = GetComponent <Player> (); cF = GetComponentInChildren <CameraFollowFinal> (); target = GameObject.Find("BossSpawn").transform; }
void Start() { boxCollider = GetComponent <BoxCollider2D>(); circleCollider = GetComponent <CircleCollider2D>(); goodSpawn = GameObject.Find("EndSpawnBack"); groundCheck = transform.Find("groundCheck"); frontCheckTop = new GameObject("frontCheckTop"); frontCheckBot = new GameObject("frontCheckBot"); playerJump = GetComponent <PlayerJump>(); playerWall = GetComponent <PlayerWall>(); playerRun = GetComponent <PlayerRun>(); playerCrouch = GetComponent <PlayerCrouch>(); playerDash = GetComponent <PlayerDash>(); playerPlatform = GetComponent <PlayerPlatform>(); normalRotation = transform.localRotation; animator = GetComponent <Animator>(); pickup = GetComponent <Pickup>(); cam = GetComponentInChildren <CameraFollowFinal> (); came = GameObject.FindWithTag("MainCamera"); frontCheckTop.transform.parent = transform; frontCheckBot.transform.parent = transform; sG = (Resources.Load("Weapons/Sounds/ReloadShotgun")) as AudioClip; wG = (Resources.Load("Weapons/Sounds/ReloadWatergun")) as AudioClip; bulletPrefab = (Resources.Load("Weapons/Rocket/Player Bullet")) as GameObject; rocketKick = (Resources.Load("Weapons/WeaponKicks/RocketKick")) as GameObject; shotgunBullet = (Resources.Load("Weapons/Shotgun/ShotgunSpraySystem")) as GameObject; shotgunKick = (Resources.Load("Weapons/WeaponKicks/ShotgunKick")) as GameObject; staffBullet = (Resources.Load("Weapons/Staff/Fireball")) as GameObject; granadeBullet = (Resources.Load("Weapons/Granade/Granade2")) as GameObject; watergunBullet = (Resources.Load("Weapons/Watergun/WaterGunBullet")) as GameObject; watergunKick = (Resources.Load("Weapons/WeaponKicks/WatergunKick")) as GameObject; machinegunBullet = (Resources.Load("Weapons/Machinegun/MachineGunBullet")) as GameObject; machinegunKick = (Resources.Load("Weapons/WeaponKicks/MachinegunKick")) as GameObject; boomerangBullet = (Resources.Load("Weapons/Boomerang/Boomerang2")) as GameObject; power = (Resources.Load("Weapons/Staff/Power")) as GameObject; boom = (Resources.Load("Weapons/Staff/Boom")) as GameObject; Launch = (Resources.Load("Weapons/Sounds/DoodleRocketLaunch")) as AudioClip; shotgunShot = (Resources.Load("Weapons/Sounds/DoodleShotgunShot")) as AudioClip; staffShot = (Resources.Load("Weapons/Sounds/DoodleStaffShot")) as AudioClip; staffBoom = (Resources.Load("Weapons/Sounds/DoodleStaffSlam")) as AudioClip; granadeShot = (Resources.Load("Weapons/Sounds/DoodleGranadeThrow")) as AudioClip; watergunShot = (Resources.Load("Weapons/Sounds/DoodleWatergun")) as AudioClip; machinegunShot = (Resources.Load("Weapons/Sounds/DoodleMachinegunFire")) as AudioClip; boomerangShot = (Resources.Load("Weapons/Sounds/DoodleGranadeThrow")) as AudioClip; outOfAmmo = (Resources.Load("Weapons/Sounds/Click")) as AudioClip; fightButton = GameObject.Find("Fight"); fightButton.SetActive(false); //transform.position = ss.transform.position; if (spriteDirection == Direction.Right) { facingRight = true; } else { facingRight = false; Flip(); } }