// This is the end of the section that should be copied and pasted public override void ExecuteEffect() { //Figure out what the target position should be at the time of execution (relative to the character that's moving) Position posDestination = funcGetTargetPosition(chrTarget); Debug.Assert(posDestination.positiontype != Position.POSITIONTYPE.BENCH); //Call the Switch method in the position controller ContPositions.Get().SwitchChrToPosition(chrTarget, posDestination); sLabel = chrSource.sName + " is moving to " + posDestination.ToString(); fDelay = ContTime.fDelayMinorSkill; }
public void InitAllChrPositions() { //Ensure all positions have been initialized properly ContPositions.Get().Start(); //Set up each team in a 'triangle' - two sides in the back, center in the front ContPositions.Get().MoveChrToPosition(arChrs[0][0], ContPositions.Get().GetPosition(NetworkMatchSetup.GetPositionCoords(0, 0))); ContPositions.Get().MoveChrToPosition(arChrs[0][1], ContPositions.Get().GetPosition(NetworkMatchSetup.GetPositionCoords(0, 1))); ContPositions.Get().MoveChrToPosition(arChrs[0][2], ContPositions.Get().GetPosition(NetworkMatchSetup.GetPositionCoords(0, 2))); ContPositions.Get().MoveChrToPosition(arChrs[1][0], ContPositions.Get().GetPosition(NetworkMatchSetup.GetPositionCoords(1, 0))); ContPositions.Get().MoveChrToPosition(arChrs[1][1], ContPositions.Get().GetPosition(NetworkMatchSetup.GetPositionCoords(1, 1))); ContPositions.Get().MoveChrToPosition(arChrs[1][2], ContPositions.Get().GetPosition(NetworkMatchSetup.GetPositionCoords(1, 2))); }
// This is the end of the section that should be copied and pasted public override void ExecuteEffect() { //Figure out what the target position should be at the time of execution (relative to the character that's moving) Position posDestination = funcGetTargetPosition(chrTarget); if (posDestination == null) { Debug.LogError("Got a null Position to move to - just returning early"); return; } Debug.Assert(posDestination.positiontype != Position.POSITIONTYPE.BENCH); //Call the Move method in the position controller ContPositions.Get().MoveChrToPosition(chrTarget, posDestination); sLabel = chrSource.sName + " is moving to " + posDestination.ToString(); fDelay = ContTime.fDelayMinorSkill; }
public static Position.Coords UnserializeCoords(int nSerialized) { return(ContPositions.IndexToCoords(nSerialized)); }
public static int SerializeCoords(Position.Coords coords) { return(ContPositions.CoordsToIndex(coords)); }
public bool IsAllyOwned(Player plyr) { return(ContPositions.Get().GetPlayerOwnerOfPosition(this) == plyr); }
public override IEnumerable <object> GetSelectableUniverse() { return(ContPositions.Get().lstAllPositions); }
public override object Unserialize(int nSerialized, List <object> lstSelectionsSoFar) { return(ContPositions.Get().GetPosition(Position.UnserializeCoords(nSerialized))); }
public override void ClauseEffect(InputSkillSelection selections) { Chr chrSelected = (Chr)selections.lstSelections[1]; //TODO - maybe add some sort of additional function that can be called exactly when the executable resolves to trigger additional effects // e.g., here it could be a structure called Tracking where you call Tracking.BeforeEffect() to track the gamestate before the executable // evaluates (this can store information, and then you call Tracking.AfterEffect() to ContSkillEngine.PushSingleExecutable(new ExecMoveChar(skill.chrOwner, chrSelected, (chrTarget) => ContPositions.Get().GetBehindPosition(chrTarget.position))); }
public override void ClauseEffect(InputSkillSelection selections) { Chr chrSelected = (Chr)selections.lstSelections[1]; ContSkillEngine.PushSingleExecutable(new ExecSwitchChar(skill.chrOwner, chrSelected, (chrTarget) => ContPositions.Get().GetInFrontPosition(chrTarget.position)) { sLabel = "Hey, I caught one!" }); }