Ejemplo n.º 1
0
    // 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;
    }
Ejemplo n.º 2
0
    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)));
    }
Ejemplo n.º 3
0
    // 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;
    }
Ejemplo n.º 4
0
 public static Position.Coords UnserializeCoords(int nSerialized)
 {
     return(ContPositions.IndexToCoords(nSerialized));
 }
Ejemplo n.º 5
0
 public static int SerializeCoords(Position.Coords coords)
 {
     return(ContPositions.CoordsToIndex(coords));
 }
Ejemplo n.º 6
0
 public bool IsAllyOwned(Player plyr)
 {
     return(ContPositions.Get().GetPlayerOwnerOfPosition(this) == plyr);
 }
Ejemplo n.º 7
0
 public override IEnumerable <object> GetSelectableUniverse()
 {
     return(ContPositions.Get().lstAllPositions);
 }
Ejemplo n.º 8
0
 public override object Unserialize(int nSerialized, List <object> lstSelectionsSoFar)
 {
     return(ContPositions.Get().GetPosition(Position.UnserializeCoords(nSerialized)));
 }
Ejemplo n.º 9
0
        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)));
        }
Ejemplo n.º 10
0
        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!"
            });
        }