//0. NONE

    //1.    SuperBounce Potion:
    //-	Makes the bag increase in velocity for three bounces. Get 25% more velocity instead of slowing down for 3 bounces. (Make sure bag doesn’t clip out of level.)

    //2.	Gigantic Potion:
    //-	Grain Size (and hitbox) increased by 50%.

    //3.	Miniature Potion:
    //-	Grain size (and hitbox) reduced by 50%.

    //4.	Success Potion.
    //-	Any gold picked up is increased by 50%.

    //5.	Presence Potion.
    //-	Gives the player a chance to change the direction that the bag is travelling by clicking around the bag.

    //6.	Iron Potion.
    //-	Grain falls incredibly quickly and doesn’t bounce.

    //7.	Score Potion.
    //-	Adds 5% of the scores total again.

    //8.	Slow Motion Potion.
    //-	Bag and grain move in slow-motion. (50% of normal speed.)

    void Start()
    {
        FH     = GetComponent <scr_FileHandler>();
        IS     = GetComponent <scr_IngameSoundManager>();
        GM     = GetComponent <scr_GameManager>();
        WBH    = GameObject.FindGameObjectWithTag("win").GetComponent <scr_winbagBehaviour>();
        SP     = GameObject.FindGameObjectWithTag("bag").GetComponent <spawnParticles>();
        BM     = GameObject.FindGameObjectWithTag("bag").GetComponent <scr_bagMovement>();
        bag    = GameObject.FindGameObjectWithTag("bag");
        pooler = GameObject.FindGameObjectWithTag("pooler").GetComponent <scr_obp>();

        //  none, SuperBounce, Gigantic, Minature, Success, Presence, Iron, Score , Slow_Motion
        m_potionType[0] = PotionType.none;
        m_potionType[1] = PotionType.SuperBounce;
        m_potionType[2] = PotionType.Gigantic;
        m_potionType[3] = PotionType.Minature;
        m_potionType[4] = PotionType.Success;
        m_potionType[5] = PotionType.Presence;
        m_potionType[6] = PotionType.Iron;
        m_potionType[7] = PotionType.Score;
        m_potionType[8] = PotionType.Slow_Motion;

        m_bouncePower        = BM.bouncePower;
        m_ScaleMultiplier    = bag.transform.localScale.x;
        m_goldMultiplier     = 1;
        m_extraThrow         = false;
        m_gravity            = 1.0f;
        m_scoreEndMultiplier = 1.0f;;
        m_timeScale          = 1;
        m_drag = bag.GetComponent <Rigidbody2D>().drag;
    }
Example #2
0
    void Awake()
    {
        WBH = GameObject.FindGameObjectWithTag("win").GetComponent <scr_winbagBehaviour>();

        GM = GameObject.Find("GameManager").GetComponent <scr_GameManager>();
        FH = GameObject.Find("GameManager").GetComponent <scr_FileHandler>();
    }