Example #1
0
        public override void OnSourceCreation(GameResult gameResult, IShip source)
        {
            GameResult IgnoreResult = new GameResult();

            OnSourceCreation(gameResult, (Ship)source, (Ship)mirrorShip.Clone());
            other.OnCreation(IgnoreResult, real.FactionInfo);
            if (other.ControlHandler == null)
            {
                other.ControlHandler = real.ControlHandler;
            }
            other.ControlHandler.OnCreation(real);
            other.Actions.OnCreation(IgnoreResult, real);
            int actioncount = other.Actions.Count;

            for (int pos = 0; pos < actioncount; ++pos)
            {
                if (other.Actions[pos] is NullTransformAction)
                {
                    this.mirrorAIInfo = other.Actions[pos].AIInfo;
                    if (this.mirrorAIInfo != null)
                    {
                        this.mirrorAIInfo.OnSourceCreation(IgnoreResult, source, this);
                    }
                    other.Actions[pos] = this;
                    break;
                }
            }
            Functions.Swap <ActionSounds>(ref actionSounds, ref mirrorActionSounds);
        }