// Start is called before the first frame update void Start() { maxEnemyHealth = 3; enemyHealth = maxEnemyHealth; bossSpawn = this.transform.position; canTurnRight = false; canTurnLeft = false; movingLeft = true; movingRight = false; facingRight = false; facingLeft = true; seen = false; enemyRigid = GetComponent <Rigidbody2D>(); theManager = FindObjectOfType <manager>(); theCharacterMovement = FindObjectOfType <characterMovement>(); theBossPoint = FindObjectOfType <BossPoint>(); }
// Start is called before the first frame update void Start() { theCharacterMovement = FindObjectOfType <characterMovement>(); theEnemyMovement = FindObjectOfType <enemyMovement>(); LevelLoader = FindObjectOfType <LevelLoader>(); theMovePickaxe = FindObjectOfType <MovePickaxe>(); theBossWall1 = FindObjectOfType <BossWall1>(); theBossSpoooderScript = FindObjectOfType <BossSpoooderScript>(); theBossRollyScript = FindObjectOfType <BossRollyScript>(); theBossPoint = FindObjectOfType <BossPoint>(); theBossWall2 = FindObjectOfType <BossWall2>(); attackCountdown = false; attackTime = 0; currentScene = SceneManager.GetActiveScene(); isPaused = false; /* * //SpriteRenderer dirtdim = dirt.GetComponent<SpriteRenderer>(); * for (int i = 0; i<10;i++) * { * for(int j = 0; j < 10; j++) * { * //Vector3 pos = dirt.transform.position; * //pos.x = dirtdim.size.x * i; * //pos.y = dirtdim.size.y * j; * //Instantiate(dirt,pos, Quaternion.identity); * } * } */ mainScore = PlayerPrefs.GetInt("Player Score"); mainScore = 0; pointText.text = "Score: " + mainScore; }
// Start is called before the first frame update void Start() { theBossPoint = FindObjectOfType <BossPoint>(); theBossWall.SetActive(false); }