示例#1
0
        private void PerformDocking(GenericShip hostShip, GenericShip dockedShip)
        {
            Roster.DockShip("ShipId:" + dockedShip.ShipId);
            hostShip.DockedShips.Add(dockedShip);
            dockedShip.DockingHost = hostShip;
            dockedShip.Model.SetActive(false);
            hostShip.ToggleDockedModel(dockedShip, true);

            dockedShip.CallDocked(hostShip);
            hostShip.CallAnotherShipDocked(dockedShip);

            hostShip.OnShipIsDestroyed += CheckForcedUndocking;

            // OLD
            if (Editions.Edition.Current is Editions.SecondEdition)
            {
                hostShip.OnCheckSystemsAbilityActivation += CheckUndockAvailability;
                hostShip.OnSystemsAbilityActivation += RegisterAskUndockSE;
            }
            else
            {
                hostShip.OnMovementFinish += RegisterAskUndockFE;
            }
            
        }
示例#2
0
        private void DockShip(GenericShip docked, GenericShip host)
        {
            if (host != null && docked != null)
            {
                Roster.DockShip("ShipId:" + docked.ShipId);
                host.DockedShips.Add(docked);
                docked.Host = host;
                docked.Model.SetActive(false);
                host.ToggleDockedModel(docked, true);

                docked.CallDocked(host);

                host.OnMovementFinish += RegisterAskUndock;
            }
        }
示例#3
0
        //old
        private void PerformDockingOld(GenericShip docked, GenericShip host)
        {
            if (host != null && docked != null)
            {
                Roster.DockShip("ShipId:" + docked.ShipId);
                host.DockedShips.Add(docked);
                docked.DockingHost = host;
                docked.Model.SetActive(false);
                host.ToggleDockedModel(docked, true);

                docked.CallDocked(host);
                host.CallAnotherShipDocked(docked);

                host.OnMovementFinish  += RegisterAskUndockFE;
                host.OnShipIsDestroyed += CheckForcedUndocking;
            }
        }
示例#4
0
        private void DockShips()
        {
            foreach (var dockedShipsPair in dockedShipsPairs)
            {
                GenericShip docked = dockedShipsPair.Key();
                GenericShip host   = dockedShipsPair.Value();
                if (host != null && docked != null)
                {
                    Roster.HideShip("ShipId:" + docked.ShipId);
                    host.DockedShips.Add(docked);
                    docked.Host = host;
                    docked.Model.SetActive(false);

                    docked.CallDocked(host);

                    host.OnMovementFinish += RegisterAskUndock;
                }
            }
        }