//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; }
void Awake() { extraThrow = false; throwExtraOnce = true; startScale = transform.localScale.x; hasTakenPosInput = false; BagCollider = GetComponent <BoxCollider2D>(); BagCollider.isTrigger = true; GM = GameObject.Find("GameManager").GetComponent <scr_GameManager>(); CS = Camera.main.GetComponent <scr_CameraScript>(); PS = GetComponent <ParticleSystem>(); PSGold = GameObject.Find("goldPickup").GetComponent <ParticleSystem>(); if (GameObject.Find("BagBoundaries").GetComponent <BoxCollider2D>() != null) { bagThrowBoundaries = GameObject.Find("BagBoundaries").GetComponent <BoxCollider2D>(); } else { Debug.LogError("BagBoundaries need BoxCollider2D"); } aimingArrow = GameObject.FindGameObjectWithTag("aimarrow"); aimingArrow.SetActive(false); BS = BagState.idle; bag = this.gameObject; bagRB = bag.GetComponent <Rigidbody2D>(); bagRB.isKinematic = true; SP = gameObject.GetComponent <spawnParticles>(); PS.Stop(); PSGold.Stop(); bagMaterial = bag.GetComponent <BoxCollider2D>().sharedMaterial; bagMaterial.bounciness = bouncePower; remainingBounces = bounces; ISG = GameObject.Find("GameManager").GetComponent <scr_IngameSoundManager>(); }
public void SetSPPointer(spawnParticles sp) { SP = sp; }