コード例 #1
0
    void Start()
    {
        animationScript = GetComponent <KingMosquitoAnimationScript>();
        animationScript.changeStateToFlyingDown();
        SetPhaseTo(flightStates.flyToPrephase);
        flightLength = new Vector2(flyDownToPreLocation.x - transform.position.x, flyDownToPreLocation.y - transform.position.y);
        flying       = true;

        boxCollider = GetComponent <BoxCollider2D>();
        GameObject.Find("Scripts").GetComponent <MusicPlayerScript>().TriggerBossMusic();
    }
コード例 #2
0
    void FlyDownToPhase2()
    {
        SetPhaseTo(flightStates.flyDownToPhase2);
        animationScript.changeStateToFlyingDown();
        // fly down slowly and spawn green mosquitios

        flying       = true;
        flightLength = new Vector2(phase2StartingLocation.x - transform.position.x, phase2StartingLocation.y - transform.position.y);
        movement     = new Vector2(flightLength.x / flyToPhase2LocationTime, flightLength.y / flyToPhase2LocationTime);

        introPacksCooldown    = introPacksRate;
        packsPerIntroCounter  = greenMosquitoPacksDuringPhase2Intro;
        packsPerIntroCounter *= Mathf.RoundToInt(1 + (currentEggPhases - 1) * packsPerRoundMultiplier);
        //Debug.Log("packs per intro counter: " + packsPerIntroCounter);
    }
コード例 #3
0
    void Start()
    {
        animationScript = GetComponent<KingMosquitoAnimationScript>();
        animationScript.changeStateToFlyingDown();
        SetPhaseTo(flightStates.flyToPrephase);
        flightLength = new Vector2(flyDownToPreLocation.x - transform.position.x, flyDownToPreLocation.y - transform.position.y);
        flying = true;

        boxCollider = GetComponent<BoxCollider2D>();
        GameObject.Find("Scripts").GetComponent<MusicPlayerScript>().TriggerBossMusic();
    }