public Player(String sN, GraphicsDeviceManager graphics) { if (sN.Equals("Naruto") || sN.Equals("naruto")) { name = sN; Run = new AnimationHandler(new Rectangle[] { new Rectangle(1, 0, 49, 59), new Rectangle(57, 0, 63, 59), new Rectangle(132, 0, 55, 59), new Rectangle(196, 0, 45, 59), new Rectangle(247, 0, 60, 59), new Rectangle(318, 0, 56, 59) }); Walk = new AnimationHandler(new Rectangle[] { new Rectangle(4, 0, 26, 71), new Rectangle(39, 0, 43, 71), new Rectangle(93, 0, 42, 71), new Rectangle(144, 0, 31, 71), new Rectangle(183, 0, 40, 71), new Rectangle(233, 0, 36, 71) }); Crouch = new AnimationHandler(new Rectangle[] { new Rectangle(0, 0, 36, 65), new Rectangle(50, 0, 35, 65), new Rectangle(98, 0, 34, 65) }); Special = new AnimationHandler(new Rectangle[] { new Rectangle(2, 0, 79, 94), new Rectangle(90, 0, 105, 94), new Rectangle(206, 0, 90, 94), new Rectangle(305, 0, 113, 94), new Rectangle(427, 0, 132, 94), new Rectangle(574, 0, 155, 94) }); Attack = new ComboHandler("BasicCombo", new AnimationHandler[] { new AnimationHandler(new Rectangle[] { new Rectangle(0, 0, 48, 66), new Rectangle(49, 0, 56, 66), new Rectangle(107, 0, 75, 66), new Rectangle(185, 0, 61, 66) }), new AnimationHandler(new Rectangle[] { new Rectangle(7, 0, 51, 60), new Rectangle(66, 0, 58, 60), new Rectangle(133, 0, 59, 60), new Rectangle(199, 0, 63, 60) }), new AnimationHandler(new Rectangle[] { new Rectangle(3, 0, 46, 66), new Rectangle(59, 0, 60, 66), new Rectangle(126, 0, 63, 66), new Rectangle(198, 0, 54, 66) }) }); Stance = new AnimationHandler(new Rectangle[] { new Rectangle(0, 0, 56, 64) }); Location = new Vector2(graphics.PreferredBackBufferWidth / 2, graphics.PreferredBackBufferHeight - 80); SpecialAttTimer = -11; } }
void Start() { _comboHandler = GameObject.FindGameObjectWithTag(Constants.Tags.GameMaster).GetComponent <ComboHandler>(); _comboHandler.StartCombo(); _leftButtonLook = LeftButton.GetComponent <ButtonLook>(); _rightButtonLook = RightButton.GetComponent <ButtonLook>(); }
private void ResetScores() { SpawnObjects.hasFirstBombGoneOff = false; ScoreDisplay.score = 0; ScoreDisplay.moneyBagsDrops = 0; bossScoreMoney = 0; bossesKilled = 0; if (GreenOrbShield.hasGreenShieldBeenBought == true) { GreenOrbShield.isGreenShieldActive = true; } if (PlayerPrefs.GetInt("AbilityTile3") == 1) { ScoreDisplay.scoreMultiplier = 3; ScoreDisplay.scoreMultiplierIncreaser = 1; } else { ScoreDisplay.scoreMultiplier = 1; ScoreDisplay.scoreMultiplierIncreaser = 1; } ScoreDisplay.multiplierGoal = 50; Destroy(GameObject.FindGameObjectWithTag("Projectile")); ComboHandler.ResetValues(); }
private void Start() { m_comboHandler = GetComponent <ComboHandler>(); m_rigidbody = GetComponent <Rigidbody>(); m_entity = GetComponent <Entity>(); m_player = FindObjectOfType <Player>(); m_state = State.STRAFE; m_strafeMinMax = new Vector2(2.0f, 5.0f); m_strafeDirMinMax = new Vector2(60.0f, 80.0f); m_chargeAttackMinMax = new Vector2(4.0f, 8.0f); m_retreatMinMax = new Vector2(0.25f, 0.75f); m_attackLimit = Random.Range((int)m_chargeAttackMinMax.x, (int)m_chargeAttackMinMax.y); m_strafeAngle = RandomBetweenRange(m_strafeDirMinMax, true); m_stateTime = RandomBetweenRange(m_strafeMinMax, false); }
private void Awake() { instance = this; comboEffects = new ObjectRecycler(); comboEffects.CreatePool(ObjectName.comboHolder, "Combo-Effects", comboEffectPrefab, 20); //comboEffectsPlaceholder = GameObject.Find("Combo-Effects-Holder").transform; for (byte i = 0; i < comboEffects.all.Count; i++) { comboEffects.all[i].transform.parent = comboEffectsPlaceholder; comboEffects.all[i].transform.localPosition = Vector3.zero; } //comboLabelGO = GameObject.Find("Combo-Label"); comboLabel = comboLabelGO.GetComponent <UILabel>(); comboLabelTrans = comboLabel.transform; comboLabelPos = comboLabelTrans.position; comboLabelIniScale = comboLabelTrans.localScale; comboHolder.SetActive(false); }
void Start() { _comboHandler = GameObject.FindGameObjectWithTag(Constants.Tags.GameMaster).GetComponent<ComboHandler>(); _comboHandler.StartCombo (); _leftButtonLook = LeftButton.GetComponent<ButtonLook>(); _rightButtonLook = RightButton.GetComponent<ButtonLook>(); }
public override void Awake() { base.Awake(); comboHandler = GetComponent <ComboHandler>(); }