public void updateTowerUI() { if (player.getCanvas() != null) { player.getCanvas().updateTowerUI(); } }
//UPDATE public virtual void InputUpdating() { if (R2Input()) { fire(); } if (R1Input()) { powerUpsUpdating(); } else { if (player.getCanvas().ingredientsMenu.activeInHierarchy) { player.getCanvas().ingredientsMenu.SetActive(false); } } if (L1input()) { ActionsInputs(); if (CircleInput()) { player.helperAttack(); } } if (TriangleInput()) { UseSkill(); } if (SquareInput()) { tossBomb(); } if (skillActive) { skillMantenance(); } //カンヴァスの画像の活性 if (L1input() && !R1Input()) { actionMenu.SetActive(true); player.getMesage().SetActive(true); player.getIcon().SetActive(false); } else { actionMenu.SetActive(false); player.getMesage().SetActive(false); player.getIcon().SetActive(true); } }
public void take(Collider other) { B_Player p = other.GetComponentInChildren <B_Player>(); if (p == null) { return; } switch (ItemType) { //爆弾追加 case itemType.bomb: p.status.addBomb(1); EffectDirector.instance.playInPlace(transform.position, StaticStrings.PICKUPSTAR); break; //普通から特別なバレットに変更 case itemType.bullet: if (bullet != null) { p.BULLETSPAWNER.changeToSpecialShoot(Ammo, bullet); } EffectDirector.instance.playInPlace(transform.position, StaticStrings.PICKUPDIAMOND); //アイコンも変わる if (itemSprite != null) { if (p.getCanvas() == null) { return; } p.getCanvas().changeIngredientImage(itemSprite); } break; //材料追加 case itemType.ingredient: Team t = p.getTeam(); if (t == tm) { p.onTakingIngredient(); EffectDirector.instance.playInPlace(transform.position, StaticStrings.PICKUPSMILE); } else { return; } break; } Destroy(gameObject); }
public void specialShoot() { WPbullet newBullet = Instantiate(currentBullet, spawnPoint.position, spawnPoint.transform.rotation); newBullet.passDirection(p, direction); specialBullet--; if (specialBullet <= 0) { specialBullet = 0; bulletSpawning = shoot; currentBullet = weaponBullet; if (p.getCanvas() == null) { return; } p.getCanvas().resetIngredientImage(); } }
public PlayerActions(B_Player _p, Inputhandler handle, Animator _anim) { player = _p; playerID = player.getID(); actionMenu = player.getCanvas().actionMenu; foreach (var p in player.enemyList) { targets.Add(p.transform); targets.Add(p.Tower.transform); targets.Add(p.Helper.transform); } hand = handle; anim = _anim; int count = 0; for (int i = 0; i < targets.Count; i++) { if (targets[i].GetComponent <B_Player>()) { count = 0; } else if (targets[i].GetComponent <PancakeTower>()) { count = 1; } else { count = 2; } player.getCanvas().giveTargetImage(i, count); //attackCounter = player.status.getCurrentweapon.attackdelay; } Sprite[] sprites = Resources.LoadAll <Sprite>("UI_Images/Icons/message"); foreach (var item in sprites) { messageImages.Add(item.name, item); } }