public NavigationNode(int ft, string l, int a, string p) { findtype = (findTypes)ft; locator = l; action = (actionTypes)a; parameter = p; }
//based on type of card hide/show certain attributes in inspector /// <summary> /// Card --> Constructor /// </summary> public Cards() { name = null; caliber = 0; defType = 0; defaultAmount = 0; cardType = cardTypes.None; damage = 0; for (int i = 0; i < AttackScope.Length; i++) { AttackScope[i] = null; } moveDistance = new Vector3(0, 0, 0); for (int i = 0; i < isDirectionViable.Length; i++) { isDirectionViable[i] = true; } actType = 0; costType = 0; costAmount = 0; cfxDurationType = 0; cfxDurationAmount = 0; }
private void ButtonControl(UISelectionDescription information) { actionTypes action = information.GetActionType(); if (action == actionTypes.Build || action == actionTypes.Spawn) { SetButtonColorAndActiveStatus(buildButton, true); SetButtonColorAndActiveStatus(evolveButton, false); SetButtonColorAndActiveStatus(researchButton, false); BuildButtonDisplayControl(information); } if (action == actionTypes.Evolve) { SetButtonColorAndActiveStatus(buildButton, false); SetButtonColorAndActiveStatus(evolveButton, true); SetButtonColorAndActiveStatus(researchButton, false); EvolveButtonDisplayControl(information); } if (action == actionTypes.Research) { SetButtonColorAndActiveStatus(buildButton, false); SetButtonColorAndActiveStatus(evolveButton, false); SetButtonColorAndActiveStatus(researchButton, true); } if (action == actionTypes.None) { SetButtonColorAndActiveStatus(buildButton, false); SetButtonColorAndActiveStatus(evolveButton, false); SetButtonColorAndActiveStatus(researchButton, false); } }
public void PerformAction(actionTypes actionToPerform) { switch (actionToPerform) { case actionTypes.move: Move(brain.movement); //Debug.Log(brain.movement); break; case actionTypes.attack: if (brain.willAttack) { Attack(); } break; case actionTypes.eat: if (brain.willEat) { Eat(); } break; case actionTypes.reproduce: if (brain.willReproduce && Time.time - lastReproductionTime > -1) { Reproduce(); lastReproductionTime = GameManager.instance.time; } break; case actionTypes.signal: foreach (var s in brain.signals) { } break; case actionTypes.scream: if (brain.screamForce > 0) { Debug.Log("scream"); Scream(brain.dialogue, brain.screamForce); } break; } }
/// <summary> /// Support Card --> Constructor /// </summary> public Cards(string _name, int _caliber, defaultType _defType, int _defAmount, actionTypes _actType, costTypes _costType, int _costAmount, cfxDurationTypes _cfxDurationType, int _cfxDurationAmount) {//add functionality for at least 2 costTypes/amounts to be used name = _name; caliber = _caliber; defType = _defType; defaultAmount = _defAmount; cardType = cardTypes.Support; actType = _actType; costType = _costType; costAmount = _costAmount; cfxDurationType = _cfxDurationType; cfxDurationAmount = _cfxDurationAmount; numCards++; }
protected bool enoughAction(actionTypes i) { switch(i) { case actionTypes.standard: if(standardAction > 0) { standardAction--; return true; } return false; case actionTypes.move: if(moveAction > 0) { moveAction--; return true; } return false; case actionTypes.free: if(freeAction > 0) { freeAction--; return true; } return false; case actionTypes.fullRound: if(getFullRoundAction() > 0) { standardAction--; moveAction--; return true; } return false; case actionTypes.swift: if(swiftAction > 0) { swiftAction--; return true; } return false; case actionTypes.immediate: if(immediateAction > 0) { immediateAction--; return true; } return false; default: return false; } }