public Entity ReplaceUnitView(UnitController newView) { var componentPool = GetComponentPool(UnitsComponentIds.UnitView); var component = (UnitViewComponent)(componentPool.Count > 0 ? componentPool.Pop() : new UnitViewComponent()); component.View = newView; ReplaceComponent(UnitsComponentIds.UnitView, component); return this; }
// Use this for initialization void Awake() { _unitCtrl = GetComponent <UnitController>(); _unitMove = GetComponent<UnitMove>(); _unitAttack = GetComponent<UnitAttack>(); _unitSpine = GetComponentInChildren<UnitSpine>() ? GetComponentInChildren<UnitSpine>() : null; }
void Start() { if (controller == null) { controller = EmptyUnitController.instance; } new ValueTracker<UnitController>(v => controller = v, () => controller); }
// Use this for initialization void Start() { unit = gameObject.GetComponentInParent<UnitController>(); }
// Use this for initialization void Start () { unit = gameObject.GetComponentInParent<UnitController>(); ps = transform.Find("Particle System").GetComponent<ParticleSystem>(); ps.enableEmission = false; noFire(); }
public static void Main() { IFactory factory = new SimpleFactory(); var controller = new UnitController(factory); IStudent student = controller.GetAllStudents(new []{"Online", "Iskra Radeva", "5.0 6 6"}); Console.WriteLine($"Name {student.Name}"); }
void Start() { unit = GetComponent<UnitController>(); if(unit == null){ state = 1; build = GetComponent<BuildingController>(); } }
void Attack(UnitController attacked) { GameObject g = Instantiate(bulletPrefab, transform.position + Vector3.up * 3, Quaternion.identity) as GameObject; //GameObject g = (GameObject)Instantiate(bulletPrefab, transform.position, Quaternion.identity); g.GetComponent<Bullet> ().damage = Damage; g.GetComponent<Bullet>().target = attacked.transform; g.GetComponent<Bullet> ().origin = gameObject; }
void Awake() { mapCtrl = GetComponent<MapController>(); wispCtrl = GetComponent<WispController>(); unitCtrl = GetComponent<UnitController>(); camCtrl = GetComponent<CameraController>(); gameUICtrl = GetComponent<GameUIController>(); spLib = GetComponent<SpriteLibrary>(); }
void OnTriggerEnter(Collider coll) { if (coll.gameObject.CompareTag("Unit")) { script = coll.gameObject.GetComponent<UnitController>(); int state = cont.DetermineRelations(script.group); if(state == 2){ cont.SphereSignal(type, coll.gameObject); } } }
private IEnumerator checkTarget() { while(true) { if (_target == null) { _target = findTargetUnit(); } yield return new WaitForSeconds(0.1f); } }
public void AddMate(UnitController newGuy) { if(this.characterCount<this.teamSize) { this.mates [characterCount] = newGuy; this.mates [characterCount].transform.rotation = face; this.mates [characterCount].id = characterCount; this.mates [characterCount].SetColor (teamColor); this.characterCount++; } }
public UnitFSM(UnitController controller) { StateIdle idleState = new StateIdle(controller); AddState(idleState); AddState(new StateMove(controller)); AddState(new StateAttack(controller)); AddState(new StateAttackMove(controller)); AddState(new StateChase(controller)); AddState(new StateHoldPosition(controller)); defaultState = idleState; Reset(); }
// Use this for initialization void Start() { unitController = GetComponent<UnitController> (); rotateRightKeyCode = (KeyCode) System.Enum.Parse(typeof(KeyCode), RotateRightKey); rotateLeftKeyCode = (KeyCode) System.Enum.Parse(typeof(KeyCode), RotateLeftKey); rotateRight += RotateRight; rotateLeft += RotateLeft; placeBomb += PlaceBomb; }
void Start() { m_tController = gameObject.GetComponentInParent<UnitController>(); m_tBody = gameObject.GetComponentInParent<BodyController>(); Renderer[] tFireEffects = gameObject.GetComponentsInChildren<Renderer>(); foreach (Renderer tEffect in tFireEffects) { if (tEffect.name == "Fire 1") m_tFireEffect1 = tEffect; else if (tEffect.name == "Fire 2") m_tFireEffect2 = tEffect; } }
private void AttackUnitWithDelay(UnitController unit, int hp) { if (currentDelay < DelayTime) { currentDelay += Time.deltaTime; } else { AttackUnit(unit, hp); Debug.Log("Give attack !"); currentDelay = 0; } }
protected override void OnOwnerFound() { base.OnOwnerFound(); if (dropped) { return; } unitController = curUnitOwner.GetComponent <UnitController>(); playerController = unitController as PlayerController; muzzle = transform.FindDeepChild(Data.muzzlePos); muzzle.forward = unitController.transform.forward; if (UIPlayer.instance && Data.aimFX) { UIPlayer.instance.AddAimFXHandler(Data.aimFX); } }
public override bool CheckCondition(UnitController controller) { NavMeshHit hit; Vector3 target = controller.Unit.transform.forward + controller.Unit.transform.position; if (NavMesh.SamplePosition(target, out hit, 0.1f, NavMesh.AllAreas)) { // Can move forward return(false); } else { // Can't move forward return(true); } }
private void Awake() { UnitController unit = GetComponent <UnitController>(); if (unit != null) { pathColor = unit.color; } grid = FindObjectOfType <Grid>(); destination = transform.position; if (selectedRenderer != null) { selectedRenderer.material.color = pathColor; } }
public void Init() { var unit = new List <Unit>() { new Unit { UnitID = 1, Name = "Kilo" }, new Unit { UnitID = 2, Name = "Bag" } }; var unitService = new Mock <IUnitService>(); unitService.Setup(m => m.GetAllUnit()).Returns(unit); _unitController = new UnitController(unitService.Object); }
/// <summary> /// Internal method, do not use. /// </summary> internal bool FinishBuildingByWorker(UnitController builderUnit) { if (Destroyed) { return(false); } if (GameManager.Instance.Factions[BuildingController.FactionIndex] .Relations[builderUnit.FactionIndex] .state == 2) { throw new Exception("The target Building belongs to an enemy, so a worker cannot be construct it"); } UnitSelection.SetTarget(new List <UnitController> { builderUnit }, GameObject, GameObject.transform.position); return(true); }
public void CmdReleaseUnit(GameObject unit) { UnitController unitController = unit.GetComponent <UnitController>(); unitController.SetCheckpointState(UnitController.EUnitCheckpointState.bannedFromStock); unit.SetActive(true); unitController.RpcSetActive(true); unit.transform.SetParent(m_friendsUnits.transform); unitController.SetObjective(Vector3.zero); ChangeNbUnitsStocked(false, unit); unitController.RpcDecrementTerritotyUnitNumberOnRelease(); //needed to cancel territory OnTriggerEnter, when unit is enable. if (m_enemiesUnits.transform.childCount == 0) { PopulateStockUnits(); } }
/// <summary> /// Internal method, do not use. /// </summary> internal bool AttackedByUnit(UnitController attackerUnit) { if (Destroyed) { return(true); } if (GameManager.Instance.Factions[BuildingController.FactionIndex] .Relations[attackerUnit.FactionIndex] .state != 2) { throw new Exception("The target Building is not enemy, so it cannot be attacked"); } UnitSelection.SetTarget(new List <UnitController> { attackerUnit }, GameObject, GameObject.transform.position); return(false); }
public void ReleaseUnit(UnitController unitController) { if (unitController.Character == null) { return; } GameObjectPool <UnitController> unitPool; if (!pools.TryGetValue(unitController.Character.UnitType, out unitPool)) { Debug.LogError(string.Format("Can't find pool for {0}", unitController.Character.UnitType)); return; } unitController.Clear(); unitPool.ReleaseObject(unitController); }
public override void OnCrossNode(Node n) { List <Node> nodes = n.GetAllNodes(); if (nodes.Count > 1) { //print(n.name); SetTargetNode(nodes[0]); for (int i = 1; i < nodes.Count; i++) { GameObject go = Instantiate(gameObject, transform.position, Quaternion.identity, transform.parent); UnitController uc = go.GetComponent <UnitController>(); uc.SetTargetNode(nodes[i]); GameManager.instance.OnUnitCreated(uc); } } }
//Filter unit timetable by campus private void CampusSorter_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (UnitClassTimes != null) { UnitController UnitBoss = (UnitController)Application.Current.FindResource("UnitBoss"); if (UnitClassTimes.Count != 0) { UnitClassGrid.Items.Clear(); Campus cam = (Campus)e.AddedItems[0]; List <UnitClass> SortedUnitClassTimes = UnitBoss.Filter(cam, UnitClassTimes); foreach (UnitClass Classes in SortedUnitClassTimes) { UnitClassGrid.Items.Add(Classes); } } } }
public override void OnControllerChanged(UnitController unitController) { UnitControllerType type = unitController.GetUnitControllerType(); switch (type) { case UnitControllerType.PLAYER_CONTROLLER: { Debug.Log("Unit " + GetHashCode() + " Is Now Controlled By Player Controller"); } break; case UnitControllerType.AI_CONTROLLER: { Debug.Log("Unit " + GetHashCode() + " Is Now Controlled By AI Controller"); } break; } }
private bool NextUnit() { List <UnitController> maxInitiativeUnits = new List <UnitController>(); int maxInitiative = int.MinValue; //bool player = false, enemy = false; foreach (UnitController unit in BattlefieldUnits.Units) { if (unit.HasPlayed) { continue; } if (maxInitiative == unit.Initiative) { maxInitiativeUnits.Add(unit); //if (unit.PlayersArmy) player = true; //else enemy = true; } else if (maxInitiative < unit.Initiative) { maxInitiative = unit.Initiative; //player = unit.PlayersArmy; //enemy = !unit.PlayersArmy; maxInitiativeUnits = new List <UnitController> { unit }; } } /*if (player && enemy) * { * List<Unit> newMaxInitiativeUnits = new List<Unit>(); * newMaxInitiativeUnits.AddRange(RandomUtil.RandomEvent(0.5) * ? maxInitiativeUnits.Where(unit => unit.PlayersArmy) * : maxInitiativeUnits.Where(unit => !unit.PlayersArmy)); * maxInitiativeUnits = newMaxInitiativeUnits; * }*/ if (maxInitiativeUnits.Count == 0) { return(false); } ActiveUnit = RandomUtil.RandomElement(maxInitiativeUnits); return(true); }
void Update() { if (Fountain != null) { if (Fountain.UnitsIsReadyCount >= 1) { Fountain.UnitsIsReadyCount -= 1; Vector3 position = new Vector3(transform.position.x, transform.position.y, transform.position.z + transform.localScale.z); UnitController mainCharacterController = (UnitController)Instantiate(MainCharacterController, position, Quaternion.identity); mainCharacterController.Unit = Fountain.Spam(); mainCharacterController.gameObject.transform.SetParent(transform); //unitController.Target = WayPoint;//.transform; MainCharacterController = mainCharacterController; } } }
/// <summary> /// Find the friendly unit nearest to a given enemy unit /// </summary> /// <param name="enemyUnitController">unitcontroller of enemy unit</param> /// <returns>unitcontroller of nearest friendly unit</returns> private UnitController FindNearestFriendlyUnit(UnitController enemyUnitController) { //loop over each friendly unit and check for the shortest distance int shortestDistance = Int32.MaxValue; //distance to unit with shortest distance UnitController shortestDistanceUnitController = null; //unitcontroller of unit with shortest distance foreach (var friendlyUnitController in playerArmy) { Coords friendlyUnitCoords = friendlyUnitController.GetUnitCoords(); if (enemyUnitController.CanAttack(friendlyUnitCoords)) { //if enemy unit can attack friendly, return the attackable unit return(friendlyUnitController); } foreach (var direction in DirectionMethods.GetClockwise()) { BFS bfs = new BFS(); Coords coordsToCheck = friendlyUnitCoords.Get(direction); //coords right next to unit in direction //check if enemy unit has path to friendly unit if (enemyUnitController.HasPath(coordsToCheck, ref bfs)) { //get length of solution and check if shorter than the previous shortest distance int solutionLength = bfs.GetSolutionLength(); if (solutionLength < shortestDistance) { shortestDistance = solutionLength; shortestDistanceUnitController = friendlyUnitController; } } } } if (shortestDistanceUnitController == null) { //there is no path to any friendly unit //just select the first enemy shortestDistanceUnitController = playerArmy[0]; } return(shortestDistanceUnitController); }
// Update is called once per frame void Update() { if (Input.GetMouseButtonDown(0)) { Vector3 mousePos = Input.mousePosition; mousePos.z = 10; Vector3 worldPos = Camera.main.ScreenToWorldPoint(mousePos); RaycastHit2D hit = Physics2D.Raycast(worldPos, Vector2.zero); if (!hit) { return; } if (hit.collider.CompareTag("Human")) { UnitController footman = hit.collider.gameObject.GetComponent <UnitController>(); if (footman == null) { return; } if (!Input.GetKey(KeyCode.LeftControl)) { footmen.Clear(); } if (footmen.IndexOf(footman) < 0) { footmen.Add(footman); footman.selected = true; GetComponent <AudioSource>().Play(); } } else if (hit.collider.CompareTag("Orc")) { Attack(hit.collider.gameObject); } else if (hit.collider.CompareTag("Tile")) { MoveSelection(worldPos); } } if (Input.GetMouseButtonDown(1)) { footmen.Clear(); } }
protected override void OnTriggerStay2D(Collider2D collision) { if (!collision.tag.Equals("Terrain")) { UnitController u = collision.transform.root.GetComponent <UnitController>(); if (u.unitType != unitType && canDetect) { if (!hitList.Contains(u.gameObject) && !exclusiveTarget) { onHit(u.gameObject); } else if (!hitList.Contains(u.gameObject) && u.gameObject.Equals(Target)) { onHit(u.gameObject); } } } }
internal override bool Progress(IUnit unit, UnitController unitController) { if (!base.Progress(unit, unitController)) { return(false); } // If the Action was already running and any target wasn't followed, it has ended if (unitController.IsAttackMove && unitController.AttackMoveTarget == null) { unitController.IsAttackMove = false; return(true); } // Starts the movement towards the goal Move.MoveToPosition(Where, unitController); unitController.IsAttackMove = true; unitController.AttackMoveTarget = null; return(false); }
public override void OnStart(GameObject go) { UnitController componentInParent = (UnitController)go.GetComponentInParent <UnitController>(); if (!Object.op_Implicit((Object)componentInParent)) { return; } if (!this.IsNoResetPrimaryHand) { componentInParent.ResetAttachmentLists(UnitController.EquipmentType.PRIMARY); } if (this.IsNoResetSecondaryHand) { return; } componentInParent.ResetAttachmentLists(UnitController.EquipmentType.SECONDARY); }
private void DoDamageToForests(UnitController controller) { Vector3 target = controller.Unit.transform.forward + controller.Unit.transform.position; RaycastHit[] hits = Physics.RaycastAll(target + Vector3.up * 5f, Vector3.down, 10f); foreach (RaycastHit hit in hits) { OneHitDestructible ohd = hit.collider.gameObject.GetComponentInChildren <OneHitDestructible>(); if (ohd != null) { while (ohd != null) { ohd.TakeDamage(1, Damageable.DamageTypes.ElephantCharge); ohd = hit.collider.gameObject.GetComponentInChildren <OneHitDestructible>(); } } } }
void Scan() { shipTargets.Clear(); Collider[] possibleTargets = Physics.OverlapSphere(transform.position, radarRange, layer); foreach (Collider c in possibleTargets) { UnitController uc = c.GetComponent <UnitController>(); if (uc) { if (uc.team != team) { shipTargets.Add(uc); } } } //call method in fcs fcs.UpdateShipTargetList(shipTargets); }
public virtual void AddUnit(UnitController unit, bool addAtRandom = false) { if (PlayerInfo.Units.Contains(unit)) { return; } if (addAtRandom) { var r = new System.Random(); int index = r.Next(PlayerInfo.Units.Count()); PlayerInfo.Units.Insert(index, unit); } else { PlayerInfo.Units.Add(unit); } }
private void CreateUnit(Constant.SpawnTypeUnit spawnType) { GameObject go = Instantiate(GameManager.Instance.GetUnitForPlayer(spawnType, m_playerNumber), m_door.position, m_door.rotation); NetworkServer.Spawn(go); GameManager.Instance.GetPlayer(m_playerNumber).IncrementNbUnitInGame(); RpcPlaySpawnFX(); UnitController goUnitController = go.GetComponent <UnitController>(); goUnitController.SetObjective(m_target.transform.position); goUnitController.SetPlayerNumber(m_playerNumber); goUnitController.SetParentPath(m_path); goUnitController.SetNexusEnemy(m_target.transform.position); if (m_playerNumber != PlayerEntity.Player.Bot) { TargetSoundEmitter(GameManager.Instance.GetPlayer(m_playerNumber).connectionToClient); } }
public override void OnStart(GameObject go) { UnitController componentInParent = (UnitController)go.GetComponentInParent <UnitController>(); if (!Object.op_Implicit((Object)componentInParent)) { return; } if (this.SwitchPrimaryHand != SwitchEquipment.eSwitchTarget.NO_CHANGE) { componentInParent.SwitchEquipmentLists(UnitController.EquipmentType.PRIMARY, (int)this.SwitchPrimaryHand); } if (this.SwitchSecondaryHand == SwitchEquipment.eSwitchTarget.NO_CHANGE) { return; } componentInParent.SwitchEquipmentLists(UnitController.EquipmentType.SECONDARY, (int)this.SwitchSecondaryHand); }
void SelectTile() { if (currentTile) { currentTile.SetDefault(); } currentTile = GridManager.instance.GetGridAtMouse(); if (currentTile) { currentTile.SetGreen(); if (currentTile.unit) { selectedUnit = currentTile.unit; } } }
public override void ApplyEffect(GameManager gm, UnitController user, UnitController guyHit, Vector3Int targetLocation) { if (guyToSummon == null) { Debug.LogError("Never got set up to summon unit"); return; } if (guyHit != null) { //someone in the way guyHit.TakeDamage(1, Effect.DamageTypes.SummoningBlocked); } else { gm.SpawnUnit(targetLocation, guyToSummon.LoadoutName, side, guyToSummon); } }
/// <summary> /// Find unit on board by coordinates list /// </summary> /// <returns>Controller</returns> private UnitController FindUnit(Team team) { UnitController unit = null; for (int i = 0; i < _list.Count; i++) { unit = _manager.GetUnitOnPosition(_list[i]); if (unit != null && unit.TeamId != team && unit.Status != UnitStatus.DEAD) { return(unit); } else { unit = null; } } return(unit); }
public float GetAIAttackTimer() { float timer = UnityEngine.Random.Range(StartingMinimumTimer, StartingMaximmTimer); timer -= (int)Difficulty * DifficultyTimeDeduction; timer -= numConvergences * ConvergenceTimeDeduction; timer += (UnitController.GetUnitCountForFaction(FactionController.OtherFaction1) - UnitController.GetUnitCountForFaction(FactionController.PlayerFaction)) * UnitDifferenceTime; timer += (AIGameStateInfo.numTowers - playerGameStateInfo.numTowers) * TowerDifferencTime; timer += (AIGameStateInfo.numUpgrades - playerGameStateInfo.numUpgrades) * UpgradeDifferenceTime; timer = Mathf.Clamp(timer, AbsoluteMinimumTimer, AbsoluteMaximumTimer); return(timer); }
private void Awake() { unitController = FindObjectOfType <UnitController>(); BaseController[] controllers = FindObjectsOfType <BaseController>(); foreach (BaseController controller in controllers) { if (controller.TeamID == GameWorld.Instance.LocalTeamId) { baseController = controller; baseController.OnToolChanged += OnToolChanged; baseController.GetGameResources().OnResourceAmountChanged += delegate { UpdateResourceTextObject(); }; UpdateResourceTextObject(); break; } } }
private void RemoveSelection(UnitController target, bool removeFromList = true) { bool selectedIndex = this.selectedUnits.Contains(target); if (selectedIndex) { //target.GetComponent<Outline>().OutlineWidth = 0.0f; Selectable selected = target.GetComponent <Selectable> (); if (selected.selectionCircle.activeSelf) { selected.selectionCircle.SetActive(false); } if (removeFromList) { this.selectedUnits.Remove(target); } } }
private void RespawnUnderPlayerControl(PlayerEntity.Player killer) { for (int i = 0; i < m_nbGolemsToSpawn; i++) { GameObject theSpawnPoint = m_golemsSpawnPoints[i].gameObject; GameObject prefabGolemPlayer = m_golemsList[i].GetComponent <GolemNeutralUnit>().GetPrefabGolemPlayer(killer); GameObject theGolem = Instantiate(prefabGolemPlayer, theSpawnPoint.transform.position, theSpawnPoint.transform.rotation); Nexus ennemyNexus = GetNearestEnemyNexus(killer); UnitController golemUnitController = theGolem.GetComponent <UnitController>(); golemUnitController.SetObjective(ennemyNexus.transform.position); golemUnitController.SetPlayerNumber(killer); golemUnitController.SetNexusEnemy(ennemyNexus.transform.position); NetworkServer.Spawn(theGolem); } RpcRespawnGolemFX(killer); }
// Update is called once per frame void Update() { if (first) { gui = GameObject.FindGameObjectWithTag("GUI").GetComponent<GUIclass>(); unit = this.transform.parent.gameObject; unitController = unit.GetComponent<UnitController>(); first = false; } isCommanded = gui.isCommandModeON; if (!isCommanded) { if (enemies.Count > 0) { if (unitController.getTarget() == null) { unitController.setTarget(enemies.First()); } } } }
public void CreateDot(UnitController unit) { float terrainWidth = MissionTerrain.terrainData.size.x; float terrainHeight = MissionTerrain.terrainData.size.z; // Represents the unit by a dot : GameObject unitDot = new GameObject("UnitDot"); RawImage dot = unitDot.gameObject.AddComponent<RawImage>(); Texture2D tex = new Texture2D(4, 4); Color fillColor = new Color(1f, 0.0f, 0.0f); var fillColorArray = tex.GetPixels(); for (var i = 0; i < fillColorArray.Length; ++i) { fillColorArray[i] = fillColor; } tex.SetPixels(fillColorArray); tex.Apply(); dot.transform.SetParent(Minimap.transform); dot.texture = tex; dot.rectTransform.anchorMax = new Vector2(0, 1); dot.rectTransform.anchorMin = new Vector2(0, 1); dot.rectTransform.pivot = new Vector2(0.5f, 0.5f); dot.rectTransform.sizeDelta = new Vector2(4, 4); float MinimapWidth = Minimap.GetComponent<RectTransform>().rect.size.x; float MinimapHeight = Minimap.GetComponent<RectTransform>().rect.size.y; dot.rectTransform.anchoredPosition = new Vector2(unit.transform.position.x / terrainWidth * MinimapWidth, unit.transform.position.z / terrainWidth * MinimapHeight - MinimapHeight); //dot.texture = Resources.Load ("dot.png") as Texture2D; // Assign this dot to an unit. unit.AssiociatedDot = dot; }
private void HealUnit(UnitController unit, int hp) { unit.Heal(hp); }
public StateChase(UnitController controller) : base(FSMStates.Chase, controller) { }
// Use this for initialization void Start() { _unitController = transform.parent.GetComponent<UnitController>(); }
public static UnitController Fixture() { UnitController controller = new UnitController(new UnitRepository(), "", new LoginView()); return controller; }
public void CancelConstruction() { isSettingConstructionPoint = false; Destroy(constructionSite.gameObject); constructionSite = null; constructor = null; }
public StateAttack(UnitController controller) : base(FSMStates.Attack, controller) { }
public void addWatchUnit(UnitController uc) { m_watchList.Add(uc); }
public void SpawnStructure(string structureName, Vector3 buildPoint, UnitController builder, Rect playingArea) { GameObject structureToSpawn = (GameObject)Instantiate(GameManager.activeInstance.GetStructurePrefab(structureName), buildPoint, new Quaternion()); constructionSite = structureToSpawn.GetComponent<StructureController>(); if (constructionSite != null) { constructor = builder; isSettingConstructionPoint = true; constructionSite.SetTransparencyMaterial(notAllowedMaterial, true); constructionSite.SetColliders(false); constructionSite.playingArea = playingArea; } else { Destroy(structureToSpawn); } }
public StateMove(UnitController controller) : base(FSMStates.Move, controller) { }
public void RemovePlayerActions(UnitController unit) { //PlayerAction[] acts = new PlayerAction[MaxActions]; PlayerAction temp; byte count=0; for(int i = 0; i<CurrentActionSet.Length;i++) { if(CurrentActionSet[i]!= null && CurrentActionSet[i].iCh==unit) { count++; temp = CurrentActionSet[MaxActions-1]; //CurrentActionSet[MaxActions-1] = CurrentActionSet[i]; CurrentActionSet[i] = temp; } } // for(int c = count; c>0;c--) // { // CurrentActionSet[CurrentActionSet.Length-c] = null; // } actionCount[CurrentTeamNum] -= count; }
private void AttackUnit(UnitController unit, int hp) { unit.Damage(hp); }
public StateHoldPosition(UnitController controller, GameplayManager gm) : base(FSMStates.HoldPosition, controller, gm) { }