示例#1
0
    // Start is called before the first frame update
    void Start()
    {
        theBossSpoooderScript = FindObjectOfType <BossSpoooderScript>();
        //theBossRollyScript = FindObjectOfType<BossRollyScript>();

        theBossWall.SetActive(true);
        currentScene = SceneManager.GetActiveScene();
    }
示例#2
0
    // Start is called before the first frame update
    void Start()
    {
        theEnemyMovement      = FindObjectOfType <enemyMovement>();
        theDemonEnemyScript   = FindObjectOfType <DemonEnemyScript>();
        theRollyScript        = FindObjectOfType <RollyScript>();
        theBossSpoooderScript = FindObjectOfType <BossSpoooderScript>();
        theBossRollyScript    = FindObjectOfType <BossRollyScript>();
        pickaxePoint1         = FindObjectOfType <PickaxePointScript>();
        theManager            = FindObjectOfType <manager>();

        theCharacterMovement = FindObjectOfType <characterMovement>();
        isOnGroundLeft       = false;
        isOnGroundRight      = false;
    }
示例#3
0
文件: manager.cs 项目: Magnus-F/aTeam
    // 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;
    }
示例#4
0
 public void HurtEnemyMethod(BossSpoooderScript objectToHurt, float damageToTake)
 {
     objectToHurt.enemyHealth -= damageToTake;
 }