public override void HandleEvent(StateMachine fsm, Brain brain, BRAIN_EVENT ev, object param = null) { if (ev == BRAIN_EVENT.END_ENEMY_ACTION) { fsm.subFsm.ChangeState(STATE_TYPE.NONE); } }
public virtual void HandleEvent(BRAIN_EVENT ev, object param = null) { if (ev == BRAIN_EVENT.DESTROY_OBJECT) { StageObject stageObject = (StageObject)param; if (opponentMem != null) { opponentMem.Remove(stageObject); } if (targetCtrl != null && targetCtrl.GetCurrentTarget() == stageObject) { targetCtrl.MissCurrentTarget(); } if (targetCtrl != null && targetCtrl.GetAllyTarget() == stageObject) { targetCtrl.SetAllyTarget(null); } if (targetUpdateSpanTimer != null) { targetUpdateSpanTimer.SetTempSpan(0.5f); } } if (fsm != null) { fsm.HandleEvent(ev, param); } if (think != null) { think.HandleEvent(this, ev, param); } }
public override void HandleEvent(Brain brain, BRAIN_EVENT ev, object param = null) { //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) base.HandleEvent(brain, ev, param); switch (ev) { case BRAIN_EVENT.BULLET_CATCH: if (!IsNowProcess(GOAL_TYPE.ENSURE_SAFETY) && brain.dangerRader != null && brain.dangerRader.AskWillHit(0.2f)) { RemoveAllSubGoals(brain); AddSubGoal <Goal_EnsureSafety>(); } break; case BRAIN_EVENT.COLLIDER_CATCH: { Vector3 attackPosition = brain.targetCtrl.GetAttackPosition(); if (!IsNowProcess(GOAL_TYPE.ENSURE_SAFETY) && brain.dangerRader != null && brain.dangerRader.AskDangerPosition(attackPosition, 0.2f)) { RemoveAllSubGoals(brain); AddSubGoal <Goal_EnsureSafety>(); } break; } } }
public override void HandleEvent(Brain brain, BRAIN_EVENT ev, object param) { base.HandleEvent(brain, ev, param); switch (ev) { case BRAIN_EVENT.PLAY_MOTION: { int num2 = (int)param; if (num2 == 115) { SetStatus(STATUS.COMPLETED); } break; } case BRAIN_EVENT.END_ACTION: { int num = (int)param; if (num == 12) { SetStatus(STATUS.COMPLETED); } break; } } }
public override void HandleEvent(StateMachine fsm, Brain brain, BRAIN_EVENT ev, object param = null) { if (ev == BRAIN_EVENT.END_ENEMY_ACTION && fsm.subFsm.currentType == STATE_TYPE.ATTACK) { fsm.ChangeState(STATE_TYPE.SEARCH); } }
private void HandleEventAllSubGoals(Brain brain, BRAIN_EVENT ev, object param) { foreach (Goal subGoal in subGoals) { subGoal.HandleEvent(brain, ev, param); } }
public override void HandleEvent(Brain brain, BRAIN_EVENT ev, object param = null) { base.HandleEvent(brain, ev, param); if (ev == BRAIN_EVENT.BULLET_CATCH && !IsNowProcess(GOAL_TYPE.ENSURE_SAFETY) && brain.dangerRader != null && !brain.dangerRader.AskWillBulletHit(0.2f)) { return; } }
public void HandleEvent(BRAIN_EVENT ev, object param = null) { if (current != null) { current.HandleEvent(this, brain, ev, param); } if (_subFsm != null) { _subFsm.HandleEvent(ev, param); } }
public override void HandleEvent(Brain brain, BRAIN_EVENT ev, object param) { base.HandleEvent(brain, ev, param); if (ev == BRAIN_EVENT.DESTROY_OBJECT) { StageObject stageObject = (StageObject)param; if (target == stageObject) { target = null; } } }
public override void HandleEvent(Brain brain, BRAIN_EVENT ev, object param) { base.HandleEvent(brain, ev, param); if (ev == BRAIN_EVENT.END_ACTION) { int num = (int)param; if (num == 18) { SetStatus(STATUS.COMPLETED); } } }
public override void HandleEvent(Brain brain, BRAIN_EVENT ev, object param) { base.HandleEvent(brain, ev, param); Player player = brain.owner as Player; if (ev == BRAIN_EVENT.END_ACTION) { int num = (int)param; if (player != null && num == 6) { if (player.attackMode == Player.ATTACK_MODE.ARROW && brain.weaponCtrl.isFullCharge) { SetStatus(STATUS.COMPLETED); } else if (player.isActSpecialAction) { SetStatus(STATUS.COMPLETED); } } } }
public override void HandleEvent(StateMachine fsm, Brain brain, BRAIN_EVENT ev, object param = null) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) if (ev == BRAIN_EVENT.ATTACKED_HIT) { ChangeActiveState(fsm, brain); Vector3 position = brain.owner._position; if (brain.param.scoutParam != null) { List <StageObject> allyObjectList = brain.GetAllyObjectList(); for (int i = 0; i < allyObjectList.Count; i++) { if (!(allyObjectList[i].controller == null)) { Brain brain2 = allyObjectList[i].controller.brain; if (!(brain2 == null)) { Vector3 val = allyObjectList[i]._position - position; if (val.get_sqrMagnitude() < brain.param.scoutParam.scoutingAudibilitySqr) { if (brain2.owner != null) { brain2.owner.SafeActIdle(); } if (brain2.fsm != null) { brain2.fsm.ChangeState(STATE_TYPE.ACTIVE); } } } } } } } }
public virtual void HandleEvent(Brain brain, BRAIN_EVENT ev, object param = null) { }
public virtual void HandleEvent(StateMachine fsm, Brain brain, BRAIN_EVENT ev, object param = null) { }
public override void HandleEvent(BRAIN_EVENT ev, object param = null) { //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) switch (ev) { case BRAIN_EVENT.END_ACTION: if (base.opponentMem != null) { base.opponentMem.Update(); } break; case BRAIN_EVENT.OWN_ATTACK_HIT: if (base.opponentMem != null) { OpponentMemory.OpponentRecord opponentRecord = base.opponentMem.Find(param as StageObject); if (opponentRecord != null) { opponentRecord.record.isDamaged = true; } } break; case BRAIN_EVENT.ATTACKED_HIT: { AttackedHitStatusOwner attackedHitStatusOwner2 = (AttackedHitStatusOwner)param; if (base.opponentMem != null) { OpponentMemory opponentMem2 = base.opponentMem; Vector3 val2 = attackedHitStatusOwner2.fromPos - attackedHitStatusOwner2.hitPos; DISTANCE distance2 = opponentMem2.GetDistance(val2.get_sqrMagnitude()); int num = (int)((float)attackedHitStatusOwner2.damage * base.opponentMem.hateParam.distanceAttackRatio[(int)distance2]); if (isNPC(attackedHitStatusOwner2.fromObject)) { num = (int)((float)num * 0.5f); } base.opponentMem.AddHate(attackedHitStatusOwner2.fromObject, num, Hate.TYPE.Damage); } break; } case BRAIN_EVENT.ATTACKED_WEAK_POINT: { AttackedHitStatusOwner attackedHitStatusOwner = (AttackedHitStatusOwner)param; if (base.opponentMem != null) { int attackedWeakPointHate = base.opponentMem.hateParam.attackedWeakPointHate; OpponentMemory opponentMem = base.opponentMem; Vector3 val = attackedHitStatusOwner.fromPos - attackedHitStatusOwner.hitPos; DISTANCE distance = opponentMem.GetDistance(val.get_sqrMagnitude()); attackedWeakPointHate = (int)((float)attackedWeakPointHate * base.opponentMem.hateParam.distanceAttackRatio[(int)distance]); if (isNPC(attackedHitStatusOwner.fromObject)) { attackedWeakPointHate = (int)((float)attackedWeakPointHate * 0.5f); } base.opponentMem.AddHate(attackedHitStatusOwner.fromObject, attackedWeakPointHate, Hate.TYPE.SpecialDamage); } break; } case BRAIN_EVENT.PLAYER_HEAL: if (base.opponentMem != null) { Player.HateInfo hateInfo2 = param as Player.HateInfo; base.opponentMem.AddHate(hateInfo2.target, hateInfo2.val, Hate.TYPE.Heal); } break; case BRAIN_EVENT.PLAYER_SKILL: if (base.opponentMem != null) { base.opponentMem.AddHate(param as StageObject, base.opponentMem.hateParam.skillHate, Hate.TYPE.Skill); } break; case BRAIN_EVENT.REVIVE_REGION: if (actionCtrl != null) { actionCtrl.OnReviveRegion((int)param); } break; case BRAIN_EVENT.DECOY: if (base.opponentMem != null) { DecoyBulletObject.HateInfo hateInfo = param as DecoyBulletObject.HateInfo; base.opponentMem.AddHate(hateInfo.target, hateInfo.value, hateInfo.type); } break; case BRAIN_EVENT.WAVE_TARGET: if (base.opponentMem != null) { base.opponentMem.AddHate(param as StageObject, 1000, Hate.TYPE.Damage); } break; } base.HandleEvent(ev, param); }
public override void HandleEvent(Brain brain, BRAIN_EVENT ev, object param) { base.HandleEvent(brain, ev, param); HandleEventAllSubGoals(brain, ev, param); }