コード例 #1
0
    // Use this for initialization
    void Start()
    {
        health     = phase1 = 1050 * 4.5f;
        phase2     = 950 * 4.5f;
        phase3     = 850 * 4.5f;
        phase4     = 750 * 4.5f;
        phase5     = 650 * 4.5f;
        phase6     = 550 * 4.5f;
        phase7     = 450 * 4.5f;
        phase8     = 350 * 4.5f;
        phase8p1   = 50 * 4.5f;
        phase8p2   = 100 * 4.5f;
        phase8p3   = 150 * 4.5f;
        phase8p4   = 200 * 4.5f;
        phase8p5   = 250 * 4.5f;
        phase8Move = false;
        canMove    = true;
        canShoot   = true;
        destroy    = false;
        fading     = true;
        //t = Time.time;
        phase = 1;
        damageReceivedMultiplier = 1;
        sparks.SetActive(false);
        sr     = GetComponent <SpriteRenderer>();
        player = GameObject.FindGameObjectWithTag("Player").transform;
        drop   = wepDrop.GetComponent <DropWeaponOnDestroy> ();

        dropManager = GameObject.Find("AbilityDropManager").GetComponent <AbilityRewardsDropList>();
        dropManager.AddBossDropsToList(4);

        Instantiate(spawn1, transform.position, Quaternion.identity);
        Instantiate(spawn2, transform.position, Quaternion.identity);
    }
コード例 #2
0
ファイル: Stage1Boss.cs プロジェクト: coconut1z/GDS1
    // Use this for initialization
    void Start()
    {
        health                   = phase1 = 350;
        phase2                   = 283;
        phase3                   = 216;
        phase4                   = 150;
        canMove                  = true;
        canShoot                 = true;
        destroy                  = false;
        phase                    = 1;
        phaseIndicator.text      = "4";
        damageReceivedMultiplier = 1;
        sparks.SetActive(false);
        sr                 = GetComponent <SpriteRenderer>();
        player             = GameObject.FindGameObjectWithTag("Player").transform;
        dropManager        = GameObject.Find("AbilityDropManager").GetComponent <AbilityRewardsDropList>();
        drop               = wepDrop.GetComponent <DropWeaponOnDestroy> ();
        specialHitInterval = 0.2f;
        wepIDs             = new List <string>();
        dropManager.AddBossDropsToList(1);
        fading = true;

        Instantiate(spawn1, transform.position, Quaternion.identity);
        Instantiate(spawn2, transform.position, Quaternion.identity);
    }
コード例 #3
0
ファイル: WeakBoss5.cs プロジェクト: coconut1z/GDS1
    // Use this for initialization
    void Start()
    {
        health   = phase1 = 150 * 3.5f;
        phase9   = 150 * 3.5f;
        canMove  = true;
        canShoot = true;
        phase    = 8;
        minised  = false;
        damageReceivedMultiplier = 1;
        sparks = (GameObject)(Resources.Load("Sparks"));
        sparks.SetActive(false);
        sr     = GetComponent <SpriteRenderer>();
        player = GameObject.FindGameObjectWithTag("Player").transform;
        Invoke("LateStart", 0.05f);

        dropManager = GameObject.Find("AbilityDropManager").GetComponent <AbilityRewardsDropList>();
        dropManager.AddBossDropsToList(5);
    }
コード例 #4
0
    // Use this for initialization
    void Start()
    {
        health   = phase1 = 500 * 1.5f;
        phase2   = 400 * 1.5f;
        phase3   = 300 * 1.5f;
        phase4   = 200 * 1.5f;
        phase5   = 100 * 1.5f;
        phase6   = 0;
        canMove  = true;
        canShoot = true;
        destroy  = false;
        phase    = 1;
        damageReceivedMultiplier = 1;
        sparks.SetActive(false);
        sr                 = GetComponentsInChildren <SpriteRenderer> ();
        player             = GameObject.FindGameObjectWithTag("Player").transform;
        parts              = GetComponentsInChildren <Stage3BossPart> ();
        spawnTimer         = 0;
        spawnDelay         = 2f;
        spawnPos           = transform.GetChild(4);
        bulletAngle        = 0;
        addAngle           = -2.5f;
        shiftCenter        = false;
        shiftCamera        = false;
        startNormalization = false;
        normalized         = false;
        deadParts          = 0;
        drop               = wepDrop.GetComponent <DropWeaponOnDestroy> ();
        fading             = true;

        dropManager = GameObject.Find("AbilityDropManager").GetComponent <AbilityRewardsDropList>();
        dropManager.AddBossDropsToList(2);

        Instantiate(spawn1, transform.position, Quaternion.identity);
        Instantiate(spawn2, transform.position, Quaternion.identity);
    }
コード例 #5
0
ファイル: SnekHead.cs プロジェクト: coconut1z/GDS1
    // Use this for initialization
    void Start()
    {
        rb = GetComponent <Rigidbody2D>();
        SetUpSparks();                   //copied from Enemy.cs
        targetA    = new Vector2(1, 4);  //set some initial targets; for testing moving onto the screen.
        targetB    = new Vector2(-4, 0);
        targetC    = new Vector2(1, -4); //this will be overwritten by the generator immediately btw. testing with invalid
        pTransform = GameObject.FindGameObjectWithTag("Player").transform;
        targetP    = pTransform.position;

        currentTargetNo = 1;//start by going for target 1/a.
        currentTarget   = targetA;

        acquiringTarget = true;  //these should always be the inverse of eachother, and therefore we don't need 2...
        snekking        = false; //but having both could help, and certainly helps when reading.
        invulnerable    = true;

        speed                    = 2.0f; //movement speed
        speedMIncrement          = 0.5f; //amount the multiplier increases by per charge attack.
        speedMultiplier          = 1.0f; //MS multiplier. apply when missing segments. Caps at 2.5/3/4.
        maxX                     = 7.0f;
        maxY                     = 4.0f;
        minRange                 = 4.0f;
        turningLeft              = true;
        snekkingMaxAngle         = 40.0f;
        snekkingAngle            = snekkingMaxAngle / 2;
        turnSpeed                = 60.0f;
        normalMovement           = false;
        preparingCharge          = false;
        charging                 = false;
        postChargeWait           = false;
        segmentsDestroyed        = 0;
        lastSegCount             = 0; //if segmentsDestroyed > this number, state may update.
        health                   = 100.0f;
        damageReceivedMultiplier = 1;


        chargePrepTimeBase   = 2.0f; //maybe alter these on difficulties.
        chargingTimeBase     = 1.5f;
        postChargingTimeBase = 1.5f;

        if (Global.Difficulty == Global.RECRUIT)
        {
            lerpSpeed = 0.5f;
        }
        else if (Global.Difficulty == Global.VETEREN)
        {
            lerpSpeed = 0.75f;
        }
        else if (Global.Difficulty == Global.BATTLEH)
        {
            lerpSpeed = 1.0f;
        }

        //aesthetics/flair;
        sr = GetComponent <SpriteRenderer>();

        srShield.sortingOrder = sr.sortingOrder + 1;

        srLayer = 30; //should be unused atm
        drop    = wepDrop.GetComponent <DropWeaponOnDestroy>();

        //weapon use
        bladeL.SetActive(false); //disables left blade
        bladeR.SetActive(false); //disables right blade

        BeginNormalMovement();
        SetHeadTransform();
        //SetPassSRLayer(); //deactive due to mysteries.

        hardCodeCharge = false;

        dropManager = GameObject.Find("AbilityDropManager").GetComponent <AbilityRewardsDropList>();
        dropManager.AddBossDropsToList(3);
    }