private void Start() { comboManager = GetComponent <ComboManager>(); trickManager = GetComponent <TrickManager>(); trickManager_Mobile = GetComponent <TrickManager_Mobile>(); animator = GetComponentInChildren <Animator>(); }
protected virtual void Init() { Combination = GetComponent <CombinationHandler>(); WaveManager = GetComponent <WaveManager>(); powerUp = GetComponent <IPowerUp>(); cm = GetComponent <ComboManager>(); }
/// <summary> /// This method handles modifying stuff with combos /// </summary> /// <param name="currentHitCount">The current amount of hits with this weapon</param> protected virtual void OnAddComboHit(long currentHitCount) { if (currentHitCount % HitsBeforeComboHit == 0) { ComboManager.Add(ComboBuildPerHit); } }
public void GenerateMenu() { if (m_comboPrefab == null) { Debug.LogError("The Combo Menu does not have a valid container prefab!"); } //empty the old list of game objects foreach (GameObject gameObject in m_comboObjects) { Destroy(gameObject); } m_comboObjects = new List <GameObject>(); //get the combo manager ComboManager c_comboManagerInstance = ComboManager.GetInstance(); //generate a game object for the different combo's foreach (string combo in c_comboManagerInstance.GetUnlockedCombos()) { ComboUIObject c_combo = CreateComboObject(); c_combo.ConnectCombo(c_comboManagerInstance.GetAllCombos()[combo]); } }
void Awake() { if (instance == null) { instance = this; } }
public void GiveReward() { switch (m_rewardType) { case EPerkRewardType.PRT_Money: LevelManager.GetInstance().AddPerkMoney(m_rewardAmount); break; case EPerkRewardType.PRT_Dice: for (int i = 0; i < m_rewardAmount; i++) { DiceManager.GetInstance().AddPerkDice(); } break; case EPerkRewardType.PRT_Combo: ComboManager.GetInstance().UnlockCombo(m_comboReward); break; case EPerkRewardType.PRT_Power: for (int i = 0; i < m_rewardAmount; i++) { DiceManager.GetInstance().AddPerkPower(); } break; default: Debug.LogWarningFormat("Perk {0} has set a wrong reward!", name); break; } }
void Start() { theComboManager = FindObjectOfType <ComboManager>(); myAnim = GetComponent <Animator>(); currentScore = 0; textScore.text = "0"; }
// Update is called once per frame void Update() { if (isInHand) { activeTool.transform.position = Hand.transform.position; //print("hullo?"); } if (Input.GetButtonDown("Y_Button") || mobileInputs.YButton) { toolType = 1; ChangeToolSelectColor(); } else if (Input.GetButtonDown("X_Button") || mobileInputs.XButton) { toolType = 0; ChangeToolSelectColor(); } else if (Input.GetButtonDown("A_Button") || mobileInputs.AButton) { toolType = 2; ChangeToolSelectColor(); } else if (Input.GetButtonDown("B_Button") || mobileInputs.BButtonBegan) { //DestroyActiveTool(); CreateTool(); } else if (Input.GetButtonUp("B_Button") || mobileInputs.BButtonUp) { DestroyActiveTool(); CreateTool(); isInHand = false; //Por alguna razon x y y van alrevez, float y = fillPowerBar.finalPowerBarValue * Mathf.Sin(shouderRotation.angle * Mathf.Deg2Rad); float x = fillPowerBar.finalPowerBarValue * Mathf.Cos(shouderRotation.angle * Mathf.Deg2Rad); print("Shoulder Angle = " + (shouderRotation.angle) + " PowerBarValue = " + fillPowerBar.finalPowerBarValue + "\n X : " + x + " Y : " + y + "\n ThrowStrength : " + throwStrength); activeTool.GetComponent <Rigidbody2D>().AddForce(new Vector2(x, y) * throwStrength); audioSource.PlayOneShot(audioWoosh); } //hace algo si se acaba el tiempo if (timeManager.IsTimeOverUpdate()) { ComboManager.resetCombo(); //print("Time is OVER"); MoneyManager.EndActivity(); print(MoneyManager.TotalMoney); GameManager.goToScene(20);//16 es el numero actual de la escena de transicion. } }
void OnTriggerEnter2D(Collider2D collision) { //Debug.Log (collision.name); if (!isInvincible && collision.CompareTag("Obstacle")) { StartCoroutine(Invincible(InvincibleTime)); if (collision.name.Contains("Bird")) { collision.GetComponent <Bird> ().AfterDamage(); } ComboManager.ComboBreak(); Debug.Log("Collide with house"); } if (collision.CompareTag("Gift")) { //Destroy(collision.gameObject); collision.gameObject.GetComponent <GiftController>().Collected(); GiftManager.GiftSentNum++; TimeManager.AddTime(3f); ComboManager.ComboUp(); //Debug.Log("Gift delivered"); } if (collision.CompareTag("Cadan")) { //Destroy(collision.gameObject); collision.transform.parent.GetComponent <Bird>().BirdGG(); TimeManager.AddTime(3f); ComboManager.ComboUp(); //Debug.Log("Gift delivered"); } }
void Start() { comboManager = GetComponent<ComboManager>() as ComboManager; Combo c = new Combo (); c.name = "JUMP"; c.sequence = new List<Combo.keyTypes> (); c.sequence.Add (Combo.keyTypes.UP); c.sequence.Add (Combo.keyTypes.UP); c.Create(); comboManager.combos.Add (c); Combo l = new Combo (); l.name = "SPINNING BIRDKICK"; l.sequence = new List<Combo.keyTypes> (); l.sequence.Add (Combo.keyTypes.DOWN); l.sequence.Add (Combo.keyTypes.LEFT); l.sequence.Add (Combo.keyTypes.DOWN); l.sequence.Add (Combo.keyTypes.HK); l.Create(); comboManager.combos.Add (l); Combo j = new Combo (); j.name = "Spinning Elbow!"; j.sequence = new List<Combo.keyTypes> (); j.sequence.Add (Combo.keyTypes.HK); j.sequence.Add (Combo.keyTypes.HK); j.sequence.Add (Combo.keyTypes.HK); j.Create(); comboManager.combos.Add (j); }
protected void Page_Load(object sender, EventArgs e) { if (!VerificaLasciapassare.CanLogOn( this.Session, this.Request.UserHostAddress ) ) { this.Response.Redirect("../errore.aspx"); }// else il lasciapassare e' valido -> get in. // /* * NB. page state check.----------------------------------------------------------------- * */ PageStateChecker.PageStateChecker_SERVICE( "zonaRiservata_candidatoInsert" , this.Request , this.IsPostBack , this.Session ); //----------------------------------------------- END page state check.----------------- if (!this.IsPostBack) { ComboManager.populate_Combo_ddlSettore_for_INSERT( this.ddlSettori, null // no preselection. Instead to preselect choose the ordinal; eg. 2=="Appalti". ); }// else DO NOT refresh the combo: it deletes the performed selection. }// end Page_Load
} // ---UpdateHp() /* * 攻撃演出処理 */ protected IEnumerator DrawBattleGraphic(BaseCharacter[] cd, ComboManager cm) { // 攻撃者の画像を貼り付ける GameObject atkObj = DamageEffect.DrawAttackChara(this); yield return(Utility._Wait.WaitFrame(30)); Destroy(atkObj); // 対象表示 DamageEffect.TargetGraphicDraw(cd[targetId]); yield return(Utility._Wait.WaitFrame(10)); // 戦闘アニメーション DamageEffect.AttackEffect(1); yield return(Utility._Wait.WaitFrame(45)); // ダメージ表示 DamageEffect.DrawDamage(DamageEffect.CalDamage(this, cm)); DamageEffect.DrawCombo(cm); yield return(Utility._Wait.WaitFrame(45)); // 消去 DamageEffect.DestroyAllObject(); yield return(0); }
// Start is called before the first frame update void Start() { theScore = FindObjectOfType <ScoreManager>(); theCombo = FindObjectOfType <ComboManager>(); theTiming = FindObjectOfType <TimingManager>(); theDatabase = FindObjectOfType <DatabaseManager>(); }
void OnTriggerEnter(Collider other) { if (other.tag == "ComboBar") { ComboManager cBar = other.GetComponent <ComboManager> (); cBar.StartCoroutine(cBar.AddToCombo(this)); } }
// Use this for initialization void Start() { scoreManager = GameObject.Find("Score").GetComponent <ScoreManager> (); comboManager = GameObject.Find("Combo").GetComponent <ComboManager> (); headSound = GameObject.Find("HeadSound").GetComponent <PlaySound> (); tailSound = GameObject.Find("TailSound").GetComponent <PlaySound> (); }
private void Start() { stateManager = GetComponent <PlayerStateManager>(); comboManager = GetComponent <ComboManager>(); //We need to start listening for Tricks and take some actions if one is completed. PrimeTricks(); }
/// <summary> /// Cuando el trabajador no resive una una herramienta a tiempo disminuye el dinero y reinicia el combo. /// </summary> private void MissedTool() { ComboManager.resetCombo(); MoneyManager.AddActivityMoney(-activityMoney / 6); //algo que represente que esta enojado GetComponent <SpriteRenderer>().sprite = angryWorker; audioSource.PlayOneShot(audioAnger); }
public override bool ShootRightClick(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { if (ComboManager.UseCombo(25)) { Projectile.NewProjectile(position.X, position.Y, speedX * 1.85f, speedY * 1.85f, ProjectileID.Typhoon, (int)(damage / 2f), 10f, player.whoAmI, 0f, 0f); Main.PlaySound(SoundID.Item45, player.position); } return(false); }
public void initCombo() { combo = Instantiate(preFabCombo); if (!combo) { Debug.LogError("GameManager: can't init combo!"); } DontDestroyOnLoad(combo); }
// 通常攻撃。(プレイヤーキャラクター) public IEnumerator PlayAction(int target, EnemyCharacterData[] enemyCd, ComboManager cm) { // 攻撃演出(仮) targetId = target; yield return(DrawBattleGraphic(enemyCd, cm)); // 攻撃処理(計算) yield return(Attack(enemyCd, cm)); }
private void Start() { comboManager = FindObjectOfType <ComboManager>(); myAnimator = GetComponent <Animator>(); scoreUpTrigger = Animator.StringToHash("ScoreUp"); currentScore = 0; scoreText.text = "0"; }
public void RollAll() { if (LevelManager.GetInstance().Rolls <= 0) { return; // we can't roll anymore if there's no rolls left! } m_rollEvent.Invoke(); ComboManager.GetInstance().CheckCombos(); SOStatManager.GetInstance().ResetStats(StatTypeEnum.ST_Turn); }
void Awake() { if (!gameStart) { _instance = this; gameStart = true; } InputManager(); }
private void Start() { //forwardMovement = GetComponent<ForwardMovement>(); //horizontalMovement = GetComponent<HorizontalMovement_Mobile>(); comboManager = GetComponent <ComboManager>(); movement = GetComponent <Movement_Mobile>(); stateManager = GetComponent <PlayerStateManager>(); initialRotation = transform.rotation; }
private void Awake() { comboManager = GetComponentInParent <ComboManager>(); audioSource = GetComponent <AudioSource>(); gameOver = GetComponent <GameOver>(); death = GetComponentInParent <Death>(); horizontalMovement = GetComponent <HorizontalMovement>(); stateManager = GetComponentInParent <PlayerStateManager>(); playerGravity = GetComponent <PlayerGravity>(); }
// Start is called before the first frame update void Start() { theStage = FindObjectOfType <StageManager>(); theCombo = FindObjectOfType <ComboManager>(); theScore = FindObjectOfType <ScoreManager>(); theTiming = FindObjectOfType <TimingManager>(); theStatus = FindObjectOfType <StatusManager>(); thePlayer = FindObjectOfType <PlayerController>(); instance = this; }
public override bool ShootRightClick(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { if (ComboManager.UseCombo(10)) { Projectile.NewProjectile(((Entity)player).Center, new Vector2(0f, 0f), ModContent.ProjectileType <PoisonAura>(), 0, 0f, ((Entity)player).whoAmI, 0f, 0f); } ; return(false); }
public Player() { _soundManager = SoundManager.Instance; _comboManager = ComboManager.Instance; _inputController = InputController.Instance; _gameManager = GameManager.Instance; _buildingManager = BuildingManager.Instance; _eventManager = EventManager.Instance; heroManager = new HeroManager(); }
public override bool ShootRightClick(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { if (!ComboManager.UseCombo(25)) { return(false); } player.AddBuff(ModContent.BuffType <Buffs.IrishFierceness>(), 1200); Main.PlaySound(SoundID.Item45, player.position); return(false); }
private void Start() { //Combo LucaDesign combo = FindObjectOfType <ComboManager>(); Camera = GameObject.Find("WeaponSlot").GetComponent <Animator>(); //------------------------------------------- playerController = FindObjectOfType <PlayerController>(); UipickupText = playerController.UIPickup; PickUpImage = playerController.PickUp; }
// Start is called before the first frame update void Start() { comboNum_ = 0; comboIconType_ = 0; comboManager_ = ComboManager.Instance; comboNumTextOutline_ = comboNumText_.GetComponent <Outline>(); SetTextComboNum(); SetColor(); }
public override bool ShootRightClick(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { if (ComboManager.UseCombo(1)) { Projectile.NewProjectile(position.X - 8f, position.Y + 8f, speedX + Main.rand.Next(-30, 30) / 150f, speedY + Main.rand.Next(-30, 30) / 150f, ModContent.ProjectileType <Projectiles.InvictusBolt>(), damage, knockBack, player.whoAmI, 0f, 0f); } return(false); }
public static void registerComboManager(GameObject comboManagerGO) { comboManager = comboManagerGO.GetComponent<ComboManager> (); }
public void UpdatePose(ComboManager.Direction poseDirection) { if (_currentHero != null) { _currentHero.UpdatePose(poseDirection, _playerNum); } }
private void OnEnable() { managerSerialized = new SerializedObject(target); manager = (ComboManager)target; attacks = managerSerialized.FindProperty("attacks"); inputs = managerSerialized.FindProperty("inputs"); comboStrings = managerSerialized.FindProperty("comboStrings"); open = managerSerialized.FindProperty("open"); attackScripts = LoadAttackScripts(); confirmAdd = false; }
protected override void Awake() { base.Awake(); // create states CreateState(SpawningState, SpawningEnter, info => {}); CreateState(IdlingState, IdlingEnter, IdlingExit); CreateState(JumpingState, JumpingEnter, info => {}); CreateState(MovingState, MovingEnter, MovingExit); CreateState(FallingState, FallingEnter, FallingExit); CreateState(AttackingState, AttackingEnter, info => {}); CreateState(UltimateState, UltimateEnter, UltimateExit); CreateState(DefendingState, DefendingEnter, DefendingExit); CreateState(DodgeRollingState, DodgeRollingEnter, DodgeRollingExit); CreateState(AirDodgingState, AirDodgingEnter, AirDodgingExit); CreateState(FlinchingState, FlinchingEnter, FlinchingExit); CreateState(StunState, StunEnter, info => {}); CreateState(DyingState, info => {}, info => {}); initialState = SpawningState; myStats.Initialize(playerInfo.username); // combat attackManager = GetComponent<AttackManager>(); attackManager.Initialize(this); comboManager = GetComponent<ComboManager>(); comboManager.Initialize(this); tauntManager = GetComponent<TauntManager>(); ultimateManager = GetComponent<UltimateAttackManager>(); shieldHealth = (int)myStats.defenseShield.value; myMagic = GetComponent<Magic>(); myMagic.Initialize(myStats); shieldRegen = new Job(RegenShield(), false); }
void Awake() { Instance = this; }
public void UpdatePose(ComboManager.Direction poseDirection, int playerNum) { if(!_isReadyToSend) { switch (poseDirection) { case ComboManager.Direction.UP: SetSprite(HERO_POSE.UP); break; case ComboManager.Direction.DOWN: SetSprite(HERO_POSE.DOWN); break; case ComboManager.Direction.LEFT: if(playerNum == 0) { SetSprite(HERO_POSE.LEFT); } else{ SetSprite(HERO_POSE.RIGHT); } break; case ComboManager.Direction.RIGHT: if(playerNum == 0) { SetSprite(HERO_POSE.RIGHT); } else{ SetSprite(HERO_POSE.LEFT); } break; default: break; } SoundManager.Instance.sfxPlay(_normalSFX); } }
void Start() { comboManager = GetComponent<ComboManager>(); }
public void InitialiseManagersAndCoreData() { //Managers uiScript = GameObject.Find("UIManager").GetComponent<UIManager>(); smScript = GameObject.Find("ScoreManager").GetComponent<ScoreManager>(); cmScript = GameObject.Find("ComboManager").GetComponent<ComboManager>(); sprite = transform.GetChild(0).GetComponent<SpriteRenderer>(); pelletRB = this.GetComponent<Rigidbody2D>(); target = GameObject.FindGameObjectWithTag("Player").transform; currentPelletState = pelletState.inFlight; }
public void triggerDirection(int player, ComboManager.Direction dir) { if (!paused) { if (_gameManager.gameState.Equals(GameManager.GameState.Playing)) { _comboManager.CheckKey(player, dir); heroManager.UpdatePose(dir); } } }