private float theta; // temp value for the 3rd skill #endregion Fields #region Methods void Awake() { startTime = Time.time; j = 0; status = transform.parent.gameObject.GetComponent<BossStatus>(); boss = transform.parent; StageRefPoint = GameObject.FindGameObjectWithTag("StageRefPoint").transform.position; }
private void CheckBossStatus() { BossStatus status = BossManager.instance.GetBossStatus(bossTarget); if (status == BossStatus.Dead) { transform.DOMoveY(transform.position.y + 4f, 2f); } }
// Start is called before the first frame update void Start() { timer = 0; out_dust_array = new GameObject[out_dust_max]; bossStat = BossStatus.instance; StartCoroutine(Exec()); }
private void BossStatusUpdateCallback(CommandDTO commandDTO) { var bossStatusUpdateParams = ((BossStatusUpdateDTO)commandDTO).command.parameters; bossName = bossStatusUpdateParams.bossName; currentBossLife = Math.Max(bossStatusUpdateParams.currentBossLife, 0L); maximumBossLife = bossStatusUpdateParams.maximumBossLife; status = (BossStatus)bossStatusUpdateParams.status; creationDate = DateTimeUtils.ConvertFromJavaScriptDate(bossStatusUpdateParams.creationDate); FireCallbacks(); }
private void Start() { player = GameObject.FindGameObjectsWithTag("Player"); rand_num = Random.Range(0, player.Length); boss_stat = BossStatus.instance; orthographic = (Camera.main != null && Camera.main.orthographic); lineRenderer = GetComponent <LineRenderer>(); lineRenderer.positionCount = 0; UpdateFromMaterialChange(); }
public void SetStatus(string _name, BossStatus _status) { foreach (BossInfo b in bossInfo) { if (b.bossName != _name) { continue; } b.status = _status; return; } }
private void Awake() { if (instance != null) { Destroy(this.gameObject); } else { //DontDestroyOnLoad(this.gameObject); instance = this; } } //--------------인스턴스화를 위함 ----
void Start() { if (GetComponent <BossController>()) { bStatus = GetComponent <BossController>().Status; } else if (GetComponent <MonsterController>()) { mStatus = GetComponent <MonsterController>().Status; } pCon = GameObject.Find("Controller").GetComponent <PlayerController>(); }
private void OnTriggerEnter2D(Collider2D collider) { if (!collider.isTrigger) { if (!enemyBullet) { if (collider.CompareTag("Enemy")) { EnemyStatus enemyStats = collider.GetComponent <EnemyStatus>(); enemyStats.health -= dmg; enemyStats.hit = true; enemyStats.knockBackDir = velocity.normalized; Destroy(gameObject); //Debug.Log("Knocked back"); } else if (collider.CompareTag("EnemyArcher")) { EnemyStatus1 enemyStats = collider.GetComponent <EnemyStatus1>(); enemyStats.health -= dmg; enemyStats.hit = true; enemyStats.knockBackDir = velocity.normalized; Destroy(gameObject); } else if (collider.CompareTag("EnemyBoss")) { BossStatus bs = collider.GetComponent <BossStatus>(); bs.hit = true; Destroy(gameObject); } else if (!collider.CompareTag("Player")) { Destroy(gameObject); } } else { if (collider.CompareTag("Player")) { PlayerStatus pstats = collider.GetComponentInParent <PlayerStatus>(); pstats.health -= dmg; pstats.stunnedByBoss = bossBullet; Destroy(gameObject); } else if (!collider.CompareTag("Enemy") && !collider.CompareTag("EnemyArcher") && !collider.CompareTag("EnemyBoss")) { Destroy(gameObject); } } } }
void Start() { mainCamera = Camera.main; fishMaxYPosition = mainCamera.ScreenToWorldPoint(new Vector3(0f, Screen.height, 0f)).y; fishMaxXPosition = mainCamera.ScreenToWorldPoint(new Vector3(Screen.width * 0.87f, 0f, 0f)).x; bossStatus = BossStatus.waiting; rb.AddForce(new Vector2(-250f, 0f)); moveDirection = MoveDirection.up; attackTime = Random.Range(minAttackTime, maxAttackTime); }
void Start() { lookatmouse = GameObject.Find("player").GetComponent <lookatmouse>(); bossStatus = GameObject.Find("Boss").GetComponent <BossStatus>(); playerController = GameObject.Find("player").GetComponent <playerController>(); if (lookatmouse.right == true) { rigi.velocity = transform.right * -speed; } else if (lookatmouse.right == false) { rigi.velocity = transform.right * speed; } Destroy(gameObject, 3f); }
public static String HomeBoss() { WindowCapture.CaptureApplication(GlobalVariables.GLOBAL_PROC_NAME); string BossStat = string.Empty; //Task task = Task.Factory.StartNew(() => //{ // UpdateVar(TextConstants.HOME_BOSS_START, TextConstants.HOME_BOSS_SIZE); //}); //Task task = Task.Factory.StartNew(() => //{ // BossStat = DoOcr.DoAsync(TextConstants.HOME_BOSS_START, TextConstants.HOME_BOSS_SIZE).Result; //}); //task.Wait(); string BossStatus; BossStatus = GetOcrResponse(TextConstants.HOME_BOSS_START, TextConstants.HOME_BOSS_SIZE); MessageBox.Show("The Finale: " + BossStatus); //Main.Sleep(5); BossStatus = BossStatus.ToLower(); BossStatus = RemoveWhiteSpace(BossStatus); BossStatus = BossStatus.Split()[0]; if (BossStatus.EndsWith("battle")) { BossStatus = "battle"; } if ((BossStatus != "battle") && (BossStatus != "next")) { Console.WriteLine(BossStatus); Console.WriteLine("Problem Recalling Function"); HomeBoss(); //Sometimes The Animation on the Boss Button makes the text unreadable // Incorrect } Console.WriteLine("Returning"); return(BossStatus); }
public static String HomeBoss() { WindowCapture.CaptureApplication(GlobalVariables.GLOBAL_PROC_NAME); //Task task = Task.Factory.StartNew(() => //{ // UpdateVar(TextConstants.HOME_BOSS_START, TextConstants.HOME_BOSS_SIZE); //}); //Task task = Task.Factory.StartNew(() => //{ // BossStat = DoOcr.DoAsync(TextConstants.HOME_BOSS_START, TextConstants.HOME_BOSS_SIZE).Result; //}); //task.Wait(); string BossStatus; BossStatus = GetOcrResponse(TextConstants.HOME_BOSS_START, TextConstants.HOME_BOSS_SIZE); //Main.Sleep(5); BossStatus = BossStatus.ToLower(); BossStatus = RemoveWhiteSpace(BossStatus); //BossStatus = BossStatus.Split()[0]; //Using .Contains on a string now makes the use of removing exsess lines usless. Main.LogConsole("Boss Status: " + BossStatus); if (BossStatus.Contains("boss")) { return("battle"); } if (BossStatus.Contains("waves")) { return("waves"); } if (BossStatus.Contains("next")) { return("next"); } return(BossStatus); }
//初期化関数 void Start() { type = DirectorType.Character; behaviorTree = GetComponent <BaseEnemyTree>(); status = GetComponent <BossStatus>(); footsPosition = new Transform[4]; SABoneColliderBuilder[] footCol = GetComponentsInChildren <SABoneColliderBuilder>(); for (int i = 0; i < footCol.Length; i++) { footsPosition[i] = footCol[i].transform; } baseObserver = new List <BaseObserver>(10); freezePos = new Vector3[4]; nUW = false; isFrozen = false; lookAtPos = new Vector3[4]; }
void Update() { if (attackTime <= 0) { bossStatus = BossStatus.attacking; } else if (bossStatus == BossStatus.waiting) { attackTime -= Time.deltaTime; } if (bossStatus == BossStatus.attacking) { Attack(); } else { Move(); } }
private void OnTriggerEnter(Collider Hit) { if (Hit.name == "EnemyCollider") { EnemyStatus Damage = Hit.GetComponent <EnemyStatus>(); if (Damage != null) { Damage.GetDamageEnemy(PlayerStatus.PlayerDamage); Destroy(gameObject); } } else if (Hit.name == "BossCollider") { BossStatus Damage = Hit.GetComponent <BossStatus>(); if (Damage != null) { Damage.GetDamageBoss(PlayerStatus.PlayerDamage); Destroy(gameObject); } } }
private void Attack() { if (isAttackLeft) { Vector2 newPosition = new Vector2(-1f, 0f) * Time.deltaTime * attackSpeed; transform.Translate(newPosition, Space.World); } else { Vector2 newPosition = new Vector2(1f, 0f) * Time.deltaTime * attackSpeed; transform.Translate(newPosition, Space.World); } if (checkIfAtXEdge()) { bossStatus = BossStatus.waiting; isAttackLeft = true; attackTime = Random.Range(5f, maxAttackTime); } }
private void Awake() { bs = GetComponent <BossStatus>(); enemyAnimController = GetComponent <EnemyAnimationController>(); circleCol = GetComponent <CircleCollider2D>(); bs = GetComponent <BossStatus>(); if (player == null) { player = GameObject.FindGameObjectWithTag("Player"); } if (bullet == null) { throw new System.Exception("BULLET PREFAB WAS NOT ADDED, CANNOT SHOOT"); } Bullets = GameObject.FindGameObjectWithTag("BulletsParent").GetComponent <Transform>(); screamEnemies = GameObject.FindGameObjectWithTag("ScreamEnemies").GetComponent <Transform>(); spawnPointsParent = GameObject.FindGameObjectWithTag("ScreamEmeniesSpawn").GetComponent <Transform>(); SetSpawnPoints(); }
void Start() { Skill = new Image[SkillNum]; BossStatus = BossStatus.instance.GetComponent <BossStatus>(); }
public override void Initialize(GameObject usingObj) { status = usingObj.GetComponent <BossStatus>(); }
private void Start() { BossStatus = GameObject.Find("Boss").GetComponent <BossStatus>(); }
//初期化関数 void Start() { cameraDire = Camera.main.GetComponent <CameraDirector>(); status = GetComponent <BossStatus>(); first = true; }
private bool isPreHealthHalfDown; //前フレームに体力が半分を下回ったか // Use this for initialization void Start() { //Commandの生成 m_angryMotionCommand = gameObject.AddComponent <BTAngryMotionBossCommand>();; m_playerObserverCommand = gameObject.AddComponent <BTPlayerObserverBossCommand>(); m_inkSpewCommand = gameObject.AddComponent <BTInkSpewBossCommand>(); m_instanceEnemyCommand = gameObject.AddComponent <BTInstanceEnemyBossCommand>(); m_waitingCommand = gameObject.AddComponent <BTWaitingCommand>(); m_rotationAttackCommand = gameObject.AddComponent <BTRotationAttackBossCommand>(); m_crabScissorsCommand = gameObject.AddComponent <BTCrabScissorsBossCommand>(); m_momentMaulCommand = gameObject.AddComponent <BTMomentMaulBossCommand>(); m_separateContinuousAttackCommand = gameObject.AddComponent <BTSeparateContinuousAttackBossCommand>(); m_fireBallPreventingEscapeCommand = gameObject.AddComponent <BTFireBallPreventingEscapeBossCommand>(); m_waiting2Command = gameObject.AddComponent <BTWaitingCommand>(); m_dyingMotionCommand = gameObject.AddComponent <BTDyingMotionBossCommand>(); m_diedCommand = gameObject.AddComponent <BTDiedBossCommand>(); m_instanceEnemy2Command = gameObject.AddComponent <BTInstanceEnemyBossCommand>(); m_waiting3Command = gameObject.AddComponent <BTWaitingCommand>(); m_stompCommand = gameObject.AddComponent <BTStompBossCommand>(); m_upDownCrabScissorsCommand = gameObject.AddComponent <BTUpDownCrabScissorsBossCommand>(); m_seaWavyCommand = gameObject.AddComponent <BTSeaWavyBossCommand>(); m_meteoWithWaterGunCommand = gameObject.AddComponent <BTMeteoWithWaterGunBossCommand>(); m_waiting4Command = gameObject.AddComponent <BTWaitingCommand>(); //Conditionの生成 m_isHealthHalfDownCondition = gameObject.AddComponent <BTIsHealthHalfDownCondition>(); m_isDyingCondition = gameObject.AddComponent <BTIsDyingBossCondition>(); m_isAfterDyingCondition = gameObject.AddComponent <BTIsAfterDyingCondition>(); //Commandの初期化 m_angryMotionCommand.Initialize(this.gameObject); m_playerObserverCommand.Initialize(this.gameObject); m_inkSpewCommand.Initialize(this.gameObject); m_instanceEnemyCommand.Initialize(this.gameObject); m_waitingCommand.Initialize(3); m_rotationAttackCommand.Initialize(this.gameObject); m_crabScissorsCommand.Initialize(this.gameObject); m_momentMaulCommand.Initialize(this.gameObject); m_separateContinuousAttackCommand.Initialize(this.gameObject); m_fireBallPreventingEscapeCommand.Initialize(this.gameObject); m_waiting2Command.Initialize(0.1f); m_dyingMotionCommand.Initialize(this.gameObject); m_diedCommand.Initialize(this.gameObject); m_instanceEnemy2Command.Initialize(this.gameObject); m_waiting3Command.Initialize(2); m_stompCommand.Initialize(this.gameObject); m_upDownCrabScissorsCommand.Initialize(this.gameObject); m_seaWavyCommand.Initialize(this.gameObject); m_meteoWithWaterGunCommand.Initialize(this.gameObject); m_waiting4Command.Initialize(0.1f); //Conditionの初期化 m_isHealthHalfDownCondition.Initialize(this.gameObject); m_isDyingCondition.Initialize(this.gameObject); m_isAfterDyingCondition.Initialize(this.gameObject); //Nodeの生成・初期化・連結 //前半のBT //third1 m_rotationAttackNode = new BTActionNode(m_rotationAttackCommand); m_crabScissorsNode = new BTActionNode(m_crabScissorsCommand); m_momentMaulNode = new BTActionNode(m_momentMaulCommand); m_separateContinuousAttackNode = new BTActionNode(m_separateContinuousAttackCommand); m_fireBallPreventingEscapeNode = new BTActionNode(m_fireBallPreventingEscapeCommand); //second1 m_angryMotionNode = new BTActionNode(m_angryMotionCommand); m_playerObserverNode = new BTActionNode(m_playerObserverCommand); m_inkSpewNode = new BTActionNode(m_inkSpewCommand); //second2 m_instanceEnemyNode = new BTActionNode(m_instanceEnemyCommand); m_waitingNode = new BTActionNode(m_waitingCommand); List <BaseBTNode> randomAttack = new List <BaseBTNode>(); randomAttack.Add(m_rotationAttackNode); randomAttack.Add(m_crabScissorsNode); randomAttack.Add(m_momentMaulNode); randomAttack.Add(m_fireBallPreventingEscapeNode); m_randomAttackNode = new BTOnOffSelector(randomAttack); m_waiting2Node = new BTActionNode(m_waiting2Command); //first1 m_isHealthHalfDownNode = new BTConditionNotToEnd(m_isHealthHalfDownCondition); List <BaseBTNode> halfMotion = new List <BaseBTNode>(); halfMotion.Add(m_angryMotionNode); halfMotion.Add(m_playerObserverNode); halfMotion.Add(m_inkSpewNode); m_halfMotionNode = new BTSequence(halfMotion); List <BaseBTNode> commonAction = new List <BaseBTNode>(); commonAction.Add(m_instanceEnemyNode); commonAction.Add(m_waitingNode); commonAction.Add(m_randomAttackNode); commonAction.Add(m_waiting2Node); m_commonActionNode = new BTSequence(commonAction); //root m_rootNode = new BTTEandNTEBoolSelector(m_halfMotionNode, m_commonActionNode, m_isHealthHalfDownNode); //後半のBT //fourth m_stompNode = new BTActionNode(m_stompCommand); m_upDownCrabScissorsNode = new BTActionNode(m_upDownCrabScissorsCommand); m_seaWavyNode = new BTActionNode(m_seaWavyCommand); m_meteoWithWaterGunNode = new BTActionNode(m_meteoWithWaterGunCommand); //third1 List <BaseBTNode> newRandomAttack = new List <BaseBTNode>(); newRandomAttack.Add(m_stompNode); m_randomAttackNode2 = new BTOnOffSelector(randomAttack); //second1 m_isAfterDyingNode = new BTConditionToEnd(m_isAfterDyingCondition); m_dyingMotionNode = new BTActionNode(m_dyingMotionCommand); m_diedNode = new BTActionNode(m_diedCommand); //second2 m_instanceEnemyNode2 = new BTActionNode(m_instanceEnemy2Command); m_waiting3Node = new BTActionNode(m_waiting3Command); List <BaseBTNode> twoSelection = new List <BaseBTNode>(); twoSelection.Add(m_randomAttackNode); twoSelection.Add(m_randomAttackNode2); m_randomTwoSelectionAttack = new BTOnOffSelector(twoSelection); m_waiting4Node = new BTActionNode(m_waiting4Command); //first1 m_isDyingNode = new BTConditionNotToEnd(m_isDyingCondition); m_afterDyingNode = new BTBoolSelector(m_diedNode, m_dyingMotionNode, m_isAfterDyingNode); List <BaseBTNode> commonAction2 = new List <BaseBTNode>(); commonAction2.Add(m_instanceEnemyNode2); commonAction2.Add(m_waiting3Node); commonAction2.Add(m_randomAttackNode); commonAction2.Add(m_waiting4Node); m_commonActionNode2 = new BTSequence(commonAction2); //root m_rootNode2 = new BTTEandNTEBoolSelector(m_afterDyingNode, m_commonActionNode2, m_isDyingNode); status = GetComponent <BossStatus>(); movePosition = new Vector3[4]; lookAtPosition = new Vector3[4]; isHealthHalfDown = false; isPreHealthHalfDown = false; }
void Start() { state = BossState.idle; _status = GetComponent <BossStatus>(); }
//初期化関数 public override void Initialize(GameObject callObj) { status = callObj.GetComponent <BossStatus>(); hpBer = GetComponent <Slider>(); }