示例#1
0
    // Use this for initialization
    void Start()
    {
        BossBrain = GameObject.FindGameObjectWithTag("BossBotTower").GetComponent <BossTowerAI>();

        firstseen = false;

        ArmColliders = GameObject.Find("Bone.008").GetComponentsInChildren <Collider>();

        player = GameObject.FindGameObjectWithTag("Player");
        //WeaponContainer = GameObject.FindGameObjectWithTag("WeaponContainer");
        hitOnce = false;

        //scriptedSwitchWeapons = GameObject.FindGameObjectWithTag("WeaponContainer").GetComponent<SwitchWeapons>();
        //CurrentPlayerWeapon = scriptedSwitchWeapons.weaponZero;
        //weaponstats = CurrentPlayerWeapon.GetComponent<WeaponStats>();
        bossparticles = GameObject.FindGameObjectsWithTag("BossParticle");
        if (flashwait == 0)
        {
            flashwait = .1f;
        }
        basehealth = 100;

        foreach (GameObject pp in bossparticles)
        {
            pp.gameObject.SetActive(false);
        }

        currenthealth = basehealth;
        music         = GameObject.Find("Music").GetComponent <AudioSource>();

        playerstats          = GameObject.FindGameObjectWithTag("Player").GetComponent <CharacterStats>();
        characterAttackBonus = playerstats.attackBonus;
    }
示例#2
0
 // Use this for initialization
 void Start()
 {
     player     = GameObject.FindGameObjectWithTag("Player");
     bossScript = GameObject.FindGameObjectWithTag("BossBotTower").GetComponent <BossTowerAI>();
     fj         = gameObject.GetComponent <FixedJoint>();
     grabber    = GameObject.FindGameObjectWithTag("Grabber");
 }
 // Use this for initialization
 void Start()
 {
     Boss        = GameObject.FindGameObjectWithTag("BossBotTower").GetComponent <BossTowerAI>();
     wheelsLeft  = 4;
     wheelColls1 = GameObject.Find("Bone.019").GetComponents <Collider>();
     wheelColls2 = GameObject.Find("Bone.020").GetComponents <Collider>();
     wheelColls3 = GameObject.Find("Bone.021").GetComponents <Collider>();
     wheelColls4 = GameObject.Find("Bone.022").GetComponents <Collider>();
 }
    // Use this for initialization
    void Start()
    {
        BossBrain = GameObject.FindGameObjectWithTag("BossBotTower").GetComponent <BossTowerAI>();

        if (!wheelflashScripts)
        {
            if (gameObject.name == "Bone.019")
            {
                Debug.Log("assigned bone 19");
                wheelflashScripts = GameObject.Find("pSphere4").GetComponent <BossWheelFlash>();
            }

            if (gameObject.name == "Bone.020")
            {
                Debug.Log("assigned bone 20");

                wheelflashScripts = GameObject.Find("pSphere1").GetComponent <BossWheelFlash>();
            }

            if (gameObject.name == "Bone.021")
            {
                Debug.Log("assigned bone 21");

                wheelflashScripts = GameObject.Find("pSphere2").GetComponent <BossWheelFlash>();
            }

            if (gameObject.name == "Bone.022")
            {
                Debug.Log("assigned bone 22");

                wheelflashScripts = GameObject.Find("pSphere3").GetComponent <BossWheelFlash>();
            }
        }

        player = GameObject.FindGameObjectWithTag("Player");
        // WeaponContainer = GameObject.FindGameObjectWithTag("WeaponContainer");
        hitOnce = false;

        //  scriptedSwitchWeapons = GameObject.FindGameObjectWithTag("WeaponContainer").GetComponent<SwitchWeapons>();
        // CurrentPlayerWeapon = scriptedSwitchWeapons.weaponZero;
        // weaponstats = CurrentPlayerWeapon.GetComponent<WeaponStats>();
        //bossparticles = gameObject.GetComponentInChildren<ParticleSystem>().gameObject;
        if (flashwait == 0)
        {
            flashwait = .1f;
        }
        basehealth = 100;

        //bossparticles.SetActive(false);
        currenthealth = basehealth;
        // rend = wheelflashScripts.gameObject.GetComponent<Renderer>();


        playerstats          = GameObject.FindGameObjectWithTag("Player").GetComponent <CharacterStats>();
        characterAttackBonus = playerstats.attackBonus;
    }
    // Use this for initialization
    void Start()
    {
        spriteRect      = gameObject.GetComponentInChildren <RectTransform>();
        levelmultiplier = LevelProgression.MasterLevelMultiplier;
        player          = GameObject.FindGameObjectWithTag("Player");
        // WeaponContainer = GameObject.FindGameObjectWithTag("WeaponContainer");
        hitOnce = false;

        //scriptedSwitchWeapons = GameObject.FindGameObjectWithTag("WeaponContainer").GetComponent<SwitchWeapons>();
        //CurrentPlayerWeapon = scriptedSwitchWeapons.weaponZero;
        //weaponstats = CurrentPlayerWeapon.GetComponent<WeaponStats>();
        bossBrain = GameObject.FindGameObjectWithTag("BossBotTower").GetComponent <BossTowerAI>();


        if (levelmultiplier < 1)
        {
            basehealth = UnityEngine.Random.Range(50, 150);
        }
        if (levelmultiplier >= 1)
        {
            basehealth = UnityEngine.Random.Range(50, 150) * levelmultiplier;
        }

        if (levelmultiplier == 0)
        {
            xpvalue = (basehealth / 10);
        }
        if (levelmultiplier >= 1)
        {
            xpvalue = (basehealth / 10) * levelmultiplier;
        }
        currenthealth        = basehealth;
        music                = GameObject.Find("Music").GetComponent <AudioSource>();
        basicAI              = gameObject.GetComponent <BossTowerAI>();
        isclipPlaying        = basicAI.clipPlaying;
        playerstats          = GameObject.Find("PlayerCharacter").GetComponent <CharacterStats>();
        characterAttackBonus = playerstats.attackBonus;
        xpGiven              = false;

        //scaledone = false;
        healthHolder  = this.gameObject.transform.Find("HealthHolder").GetComponent <Transform>();
        originalscale = healthHolder.localScale.x;
    }