コード例 #1
0
ファイル: CoolerBear.cs プロジェクト: MrLucas265/LakeNet
    void WebSearch()
    {
        ws = AppSoftware.GetComponent <WebSec>();
        sm = AppSoftware.GetComponent <SystemMap>();

        testsite = Database.GetComponent <TestSite>();
        becas    = Database.GetComponent <Becas>();
        RevaTest = Database.GetComponent <Test>();
        ping     = Database.GetComponent <Ping>();
        uc       = Database.GetComponent <Unicom>();
        jd       = Database.GetComponent <JailDew>();
        LEC      = Database.GetComponent <LECBank>();
        reva     = Database.GetComponent <Reva>();
        st       = Database.GetComponent <ShareTrades>();
        mgw      = Minigames.GetComponent <MiniGameWeb>();
        tug      = Database.GetComponent <TUG>();
        sh       = Database.GetComponent <ServerHost>();
        test1    = Database.GetComponent <Test1>();
        gstocks  = Database.GetComponent <GStocks>();
        hs       = Database.GetComponent <HardwareSite>();
        //cc = Database.GetComponent<CabbageCorp>();

        dr = Minigames.GetComponent <DragRacer>();

        ib = AppSoftware.GetComponent <InternetBrowser>();
    }
コード例 #2
0
ファイル: Scene.cs プロジェクト: OkashiKami/Odyssey
        public Scene(IServiceRegistry services)
        {
            Contract.Requires <ArgumentNullException>(services != null, "services");
            messenger                 = new Messenger();
            entityMap                 = new EntityMap(this);
            systemMap                 = new SystemMap(this);
            updateableSystems         = new List <IUpdateableSystem>();
            renderableSystems         = new List <IRenderableSystem>();
            currentlyUpdatingSystems  = new List <IUpdateableSystem>();
            currentlyRenderingSystems = new List <IRenderableSystem>();
            Services = services;
            Services.AddService(typeof(IEntityProvider), this);
            Services.AddService(typeof(IResourceProvider), this);
            var content = Services.GetService <IAssetProvider>();

            content.AddMapping("Scene", typeof(Scene));

            entityMap.EntityAdded            += systemMap.OnEntityAdded;
            entityMap.EntityRemoved          += systemMap.OnEntityRemoved;
            entityMap.EntityComponentAdded   += systemMap.OnEntityComponentAdded;
            entityMap.EntityComponentRemoved += systemMap.OnEntityComponentRemoved;

            systemMap.SystemAdded   += SystemMapOnSystemAdded;
            systemMap.SystemRemoved += SystemMapOnSystemRemoved;

            tagManager = new TagManager();
        }
コード例 #3
0
        public void addStarToField(SystemMap _star)
        {
            int   regionId = GeometryIndex.calcRegionId(_star.posX, _star.posY);
            Field field    = GeometryIndex.regions[regionId].findOrCreateField(_star.posX, _star.posY);

            field.starId = _star.id;
            _star.field  = field;
        }
コード例 #4
0
        public bool addColonyToField(Colony _colony)
        {
            SystemMap colonyStar = stars[_colony.starId];
            int       regionId   = GeometryIndex.calcRegionId(colonyStar.posX, colonyStar.posY);
            Field     field      = GeometryIndex.regions[regionId].findOrCreateField(colonyStar.posX, colonyStar.posY);

            _colony.field = field;
            return(field.addColony(_colony));
        }
コード例 #5
0
ファイル: RemoteView.cs プロジェクト: MrLucas265/LakeNet
    void WebSearch()
    {
        ws = AppSoftware.GetComponent <WebSec>();
        sm = AppSoftware.GetComponent <SystemMap>();

        //cc = Database.GetComponent<CabbageCorp>();

        ib = AppSoftware.GetComponent <InternetBrowser>();
    }
コード例 #6
0
ファイル: QuanOSDesktop.cs プロジェクト: MrLucas265/LakeNet
    // Use this for initialization
    void Start()
    {
        AppSoftware     = GameObject.Find("Applications");
        HackingSoftware = GameObject.Find("Hacking");
        SysSoftware     = GameObject.Find("System");
        //Computer = GameObject.Find("Computer");

        //System
        clk    = SysSoftware.GetComponent <Clock>();
        defalt = SysSoftware.GetComponent <Defalt>();
        am     = SysSoftware.GetComponent <AppMenu>();
        cmd    = SysSoftware.GetComponent <CLI>();
        com    = SysSoftware.GetComponent <Computer>();
        sc     = SysSoftware.GetComponent <SoundControl>();
        appman = SysSoftware.GetComponent <AppMan>();
        boot   = SysSoftware.GetComponent <Boot>();
        post   = SysSoftware.GetComponent <POST>();
        os     = SysSoftware.GetComponent <OS>();
        mouse  = SysSoftware.GetComponent <Mouse>();
        desk   = SysSoftware.GetComponent <Desktop>();

        //Applications
        al = AppSoftware.GetComponent <AccLog>();
        sm = AppSoftware.GetComponent <SystemMap>();
        ib = AppSoftware.GetComponent <InternetBrowser>();

        //Hacking
        prog  = HackingSoftware.GetComponent <Progtive>();
        trace = HackingSoftware.GetComponent <Tracer>();
        cy    = HackingSoftware.GetComponent <Descy>();
        ds    = HackingSoftware.GetComponent <DirSearch>();

        mb    = GetComponent <MissionBrow>();
        cc    = GetComponent <CurContracts>();
        sl    = GetComponent <SiteList>();
        note  = GetComponent <Notepad>();
        fav   = GetComponent <Favs>();
        tv    = GetComponent <TreeView>();
        mPass = GetComponent <MonitorBypass>();
        wsv   = GetComponent <WebSecViewer>();
        sdp   = GetComponent <ShutdownProm>();
        Audio = GetComponent <AudioSource>();

        windowRect.x = Customize.cust.windowx[windowID];
        windowRect.y = Customize.cust.windowy[windowID];

        Audio.volume = Customize.cust.Volume;
        DesktopY     = -50;
        StartTime    = 0.030f;
        Snap         = false;

        if (Size == 0)
        {
            Size = 21;
        }
    }
コード例 #7
0
        public void getAreaCreator(byte _direction, int _userId, Ship _ship, ref List <Ship> _ships, ref List <SpacegameServer.Core.SystemMap> _stars, ref List <SpacegameServer.Core.Colony> _colonies, Colony scanningColony = null)
        {
            var starXY = getDestinationField(_ship, _direction);

            if (_userId < 0)
            {
                return;
            }
            SpacegameServer.Core.User user = (SpacegameServer.Core.User)users[_userId];
            if (user == null)
            {
                return;
            }

            //fetch an area of radius 7 around the target field
            //check all colonies inside it. Every colony that has the targetfield inside it's border range is returned...
            //List<Field> neigbouringFields = new List<Field>();
            //GeometryIndex.getFields(_ship.field, 7, neigbouringFields);

            //int targetRegionId = GeometryIndex.calcRegionId(starXY.Key, starXY.Value);
            //var targetField = GeometryIndex.regions[targetRegionId].findOrCreateField(starXY.Key, starXY.Value);

            int targetRegionId = GeometryIndex.calcRegionId(starXY.Key, starXY.Value);
            var targetField    = GeometryIndex.regions[targetRegionId].findOrCreateField(starXY.Key, starXY.Value);

            //fetch all colonies affecting the targetField
            _colonies = Core.Instance.colonies.Where(colony => targetField.InfluencedBy.Any(influencer => influencer == colony.Value)).Select(colKeyValue => colKeyValue.Value).ToList();


            //fetch the star each colony is positioned
            foreach (int fieldId in (_colonies.Select(colony => colony.field.id)))
            {
                Field currentField = ((Field)GeometryIndex.allFields[fieldId]);

                if (currentField.starId != null)
                {
                    int       starId = (int)currentField.starId;
                    SystemMap star   = stars[starId];
                    _stars.Add(star);

                    //if scan is determined for a single ship, check if that user already kwos the systems scanned:
                    if ((_ship != null) && !user.knownStars.Contains(starId))
                    {
                        user.knownStars.Add(starId);
                        UserStarMap newStar = new UserStarMap(user.id, starId);

                        List <AsyncInsertable> newKnownStar = new List <AsyncInsertable>();
                        newKnownStar.Add(newStar);

                        dataConnection.insertAsyncTransaction(newKnownStar);
                    }
                }
            }

            return;
        }
コード例 #8
0
ファイル: Scene.cs プロジェクト: dea6cat/Woofer
        public Scene()
        {
            Entities = new EntityMap(this);
            Systems  = new SystemMap(this);
            Sprites  = new SpriteSet();
            Events   = new EventManager();

            Entities.Changed += NotifyEntityChange;
            CurrentViewport   = new CameraView();
        }
コード例 #9
0
ファイル: Scene.cs プロジェクト: dncep/Woofer
        /// <summary>
        /// Creates and initializes a scene for the given controller
        /// </summary>
        /// <param name="controller"></param>
        public Scene(IGameController controller)
        {
            Controller = controller;

            Entities = new EntityMap(this);
            Systems  = new SystemMap(this);
            Events   = new EventManager();

            Entities.Changed += NotifyEntityChange;
            CurrentViewport   = new CameraView();
        }
コード例 #10
0
ファイル: QuanOSAppMenu.cs プロジェクト: MrLucas265/LakeNet
    void Start()
    {
        SysSoftware     = GameObject.Find("System");
        AppSoftware     = GameObject.Find("Applications");
        HackingSoftware = GameObject.Find("Hacking");

        com  = SysSoftware.GetComponent <Computer>();
        ib   = AppSoftware.GetComponent <InternetBrowser>();
        note = AppSoftware.GetComponent <Notepad>();
        prog = HackingSoftware.GetComponent <Progtive>();
        al   = SysSoftware.GetComponent <AccLog>();

        trace = HackingSoftware.GetComponent <Tracer>();

        cy      = SysSoftware.GetComponent <Descy>();
        ds      = SysSoftware.GetComponent <DirSearch>();
        tv      = SysSoftware.GetComponent <TreeView>();
        al      = AppSoftware.GetComponent <AccLog>();
        cmd     = SysSoftware.GetComponent <CLI>();
        sm      = AppSoftware.GetComponent <SystemMap>();
        clk     = SysSoftware.GetComponent <Clock>();
        defalt  = SysSoftware.GetComponent <Defalt>();
        sc      = SysSoftware.GetComponent <SoundControl>();
        appmenu = SysSoftware.GetComponent <AppMenu>();
        appman  = SysSoftware.GetComponent <AppMan>();

        windowRect.x = Customize.cust.windowx[windowID];
        windowRect.y = Customize.cust.windowy[windowID];

        native_height = Customize.cust.native_height;
        native_width  = Customize.cust.native_width;

        UpdateUI();
        for (Index = 0; Index < GameControl.control.ProgramFiles.Count; Index++)
        {
            if (GameControl.control.ProgramFiles[Index].Name == "Gateway")
            {
                TestCheck = true;
            }
        }

        if (Index >= GameControl.control.ProgramFiles.Count)
        {
            if (TestCheck == false)
            {
                Test();
            }
        }

        X     = -350;
        Speed = 600;

        windowID = appmenu.windowID;
    }
コード例 #11
0
    void WebSearch()
    {
        ws      = AppSoftware.GetComponent <WebSec>();
        sm      = AppSoftware.GetComponent <SystemMap>();
        st      = Database.GetComponent <ShareTrades>();
        gstocks = Database.GetComponent <GStocks>();
        //cc = Database.GetComponent<CabbageCorp>();

        dr = Minigames.GetComponent <DragRacer>();

        seb = AppSoftware.GetComponent <StockExchangeBrowser>();
    }
コード例 #12
0
    private void Awake()
    {
        _injector        = new Injector();
        _directCommand   = new DirectCommand(_injector);
        _eventDispatcher = new EventDispatcher();
        _eventCommandMap = new EventCommandMap(_eventDispatcher, _injector);
        _viewFactory     = new ViewFactory();
        _mediatorMap     = new MediatorMap(_viewFactory, _injector);
        _entityDatabase  = new EntityDatabase();
        _systemMap       = new SystemMap(_entityDatabase);
        _updater         = new Updater();

        _injector.Inject(_directCommand);
        _injector.Inject(_eventDispatcher);
        _injector.Inject(_entityDatabase);
        _injector.Inject(_mediatorMap);
        _injector.Inject <IUpdater>(_updater);

        // systems
        _systemMap.Add(new PlayerMovementSystem());
        _systemMap.Add(new PlayerShootingSystem());
        _systemMap.Add(new CameraFollowSystem());
        _systemMap.Add(new EnemySpawnerSystem());
        _systemMap.Add(new EnemyMovementSystem());
        _systemMap.Add(new EnemyDamageSystem());
        _systemMap.Add(new EnemyAttackSystem());
        _systemMap.Add(new PlayerDamageSystem());
        _systemMap.Add(new EnemySinkingSystem());

        // injection
        _injector.Inject <IGameData>(gameData);
        _injector.Inject(new AudioModel());
        _injector.Inject(new PlayerHealthModel());
        _injector.Inject(new ScoreModel());

        // view factory
        _viewFactory.Register(damageView, false);
        _viewFactory.Register(gameOverView, false);
        _viewFactory.Register(healthView, false);
        _viewFactory.Register(pauseView, false);
        _viewFactory.Register(scoreView, false);

        // mediator
        _mediatorMap.Map <DamageMediator>(ViewType.Damage);
        _mediatorMap.Map <GameOverMediator>(ViewType.GameOver);
        _mediatorMap.Map <HealthMediator>(ViewType.Health);
        _mediatorMap.Map <PauseMediator>(ViewType.Pause);
        _mediatorMap.Map <ScoreMediator>(ViewType.Score);

        // event command
        _eventCommandMap.Map(GameEvent.GameOverComplete, new RestartCommand());
    }
コード例 #13
0
    // Use a factory method to instantiate the system components and plug things together
    public void initializeSystem()
    {
        var masterA = new Master("a");
        var masterB = new Master("b");
        var masterC = new Master("c");

        SystemMap.registerNewMaster(masterA, typeof(Handler1));
        SystemMap.registerNewMaster(masterB, typeof(Handler2));
        SystemMap.registerNewMaster(masterC, typeof(Handler3));
        SomeLibrary.register(typeof(Handler1));
        SomeLibrary.register(typeof(Handler2));
        SomeLibrary.register(typeof(Handler3));
    }
コード例 #14
0
 void WebSearch()
 {
     ib     = AppsSoftware.GetComponent <InternetBrowser>();
     misgen = Missions.GetComponent <MissionGen>();
     ep     = Prompts.GetComponent <ErrorProm>();
     upg    = Computer.GetComponent <Upgrade>();
     defalt = SysSoftware.GetComponent <Defalt>();
     pp     = Prompts.GetComponent <PurchasePrompt>();
     prog   = HackingSoftware.GetComponent <Progtive>();
     trace  = HackingSoftware.GetComponent <Tracer>();
     brow   = Missions.GetComponent <MissionBrow>();
     sm     = AppsSoftware.GetComponent <SystemMap>();
     dskman = SysSoftware.GetComponent <DiskMan>();
     fu     = SysSoftware.GetComponent <FileUtility>();
 }
コード例 #15
0
ファイル: Scene.cs プロジェクト: dncep/Woofer
        public bool Disposed = false; // To detect redundant calls

        protected virtual void Dispose(bool disposing)
        {
            if (!Disposed)
            {
                if (disposing)
                {
                    Destroy();
                }

                Entities = null;
                Systems  = null;
                Events   = null;

                Disposed = true;
            }
        }
コード例 #16
0
ファイル: RevaTest.cs プロジェクト: MrLucas265/LakeNet
 void WebSearch()
 {
     // APPLICATIONS
     ws = Applications.GetComponent <WebSec>();
     sm = Applications.GetComponent <SystemMap>();
     tr = Applications.GetComponent <TextReader>();
     ib = Applications.GetComponent <InternetBrowser>();
     // PROMPTS
     ep = Prompts.GetComponent <ErrorProm>();
     // HACKING
     trace = Hacking.GetComponent <Tracer>();
     prog  = Hacking.GetComponent <Progtive>();
     // SYSTEM
     com  = System.GetComponent <Computer>();
     def  = System.GetComponent <Defalt>();
     pl   = System.GetComponent <PasswordList>();
     clic = System.GetComponent <CLICommandsV2>();
 }
コード例 #17
0
    void Start()
    {
        SysSoftware = GameObject.Find("System");
        AppSoftware = GameObject.Find("Applications");
        Database    = GameObject.Find("Database");

        clic = SysSoftware.GetComponent <CLICommandsV2>();


        ws = AppSoftware.GetComponent <WebSec>();
        sm = AppSoftware.GetComponent <SystemMap>();

        //		para = Database.GetComponent<Para>();
        st            = Database.GetComponent <ShareTrades>();
        gstocks       = Database.GetComponent <GStocks>();
        stockexchange = Database.GetComponent <StockExchange>();
        port          = Database.GetComponent <Portfolio>();
        history       = Database.GetComponent <StockTransactionHistory>();
    }
コード例 #18
0
    void Start()
    {
        SysSoftware     = GameObject.Find("System");
        AppSoftware     = GameObject.Find("Applications");
        HackingSoftware = GameObject.Find("Hacking");

        com  = SysSoftware.GetComponent <Computer>();
        ib   = AppSoftware.GetComponent <InternetBrowser>();
        note = AppSoftware.GetComponent <Notepad>();
        prog = HackingSoftware.GetComponent <Progtive>();
        al   = SysSoftware.GetComponent <AccLog>();

        trace = HackingSoftware.GetComponent <Tracer>();

        cy      = SysSoftware.GetComponent <Descy>();
        ds      = SysSoftware.GetComponent <DirSearch>();
        tv      = SysSoftware.GetComponent <TreeView>();
        al      = AppSoftware.GetComponent <AccLog>();
        cmd     = SysSoftware.GetComponent <CLI>();
        sm      = AppSoftware.GetComponent <SystemMap>();
        clk     = SysSoftware.GetComponent <Clock>();
        defalt  = SysSoftware.GetComponent <Defalt>();
        sc      = SysSoftware.GetComponent <SoundControl>();
        appmenu = SysSoftware.GetComponent <AppMenu>();
        appman  = SysSoftware.GetComponent <AppMan>();

        windowRect.x = Customize.cust.windowx[windowID];
        windowRect.y = Customize.cust.windowy[windowID];

        native_height = Customize.cust.native_height;
        native_width  = Customize.cust.native_width;

        UpdateUI();
        if (GameControl.control.QuickProgramList.Count < 1)
        {
            Test();
        }

        X     = 700;
        Speed = 3;

        windowID = appmenu.windowID;
    }
コード例 #19
0
ファイル: InternetBrowser.cs プロジェクト: MrLucas265/LakeNet
    void Start()
    {
        SysSoftware = GameObject.Find("System");
        AppSoftware = GameObject.Find("Applications");
        Database    = GameObject.Find("Database");
        Minigames   = GameObject.Find("MiniGames");

        clic = SysSoftware.GetComponent <CLICommandsV2>();


        ws = AppSoftware.GetComponent <WebSec>();
        sm = AppSoftware.GetComponent <SystemMap>();

        testsite = Database.GetComponent <TestSite>();
        becas    = Database.GetComponent <Becas>();
        aki      = Database.GetComponent <Aki>();
        RevaTest = Database.GetComponent <Test>();
        revatest = Database.GetComponent <RevaTest>();
        ping     = Database.GetComponent <Ping>();
        uc       = Database.GetComponent <Unicom>();
        jd       = Database.GetComponent <JailDew>();
//		para = Database.GetComponent<Para>();
        LEC        = Database.GetComponent <LECBank>();
        reva       = Database.GetComponent <Reva>();
        st         = Database.GetComponent <ShareTrades>();
        mgw        = Minigames.GetComponent <MiniGameWeb>();
        tug        = Database.GetComponent <TUG>();
        sh         = Database.GetComponent <ServerHost>();
        test1      = Database.GetComponent <Test1>();
        gstocks    = Database.GetComponent <GStocks>();
        hs         = Database.GetComponent <HardwareSite>();
        store      = Database.GetComponent <Store>();
        melvenauni = Database.GetComponent <MelvenaUniversity>();
        isd        = Database.GetComponent <ISD>();
        //cc = Database.GetComponent<CabbageCorp>();

        dr = Minigames.GetComponent <DragRacer>();
    }
コード例 #20
0
    // Use this for initialization
    void Start()
    {
        Hardware        = GameObject.Find("Hardware");
        Prompts         = GameObject.Find("Prompts");
        SysSoftware     = GameObject.Find("System");
        TraceSnd        = GameObject.Find("Trace Tracker");
        HackingSoftware = GameObject.Find("Hacking");
        AppSoftware     = GameObject.Find("Applications");

        com = SysSoftware.GetComponent <Computer>();
        def = SysSoftware.GetComponent <Defalt>();
        sc  = SysSoftware.GetComponent <TTSndControl>();

        ws = AppSoftware.GetComponent <WebSec>();
        sm = AppSoftware.GetComponent <SystemMap>();
        ib = AppSoftware.GetComponent <InternetBrowser>();

        windowRect.x  = Customize.cust.windowx[windowID];
        windowRect.y  = Customize.cust.windowy[windowID];
        beeptimer     = beepcooldown;
        native_height = Customize.cust.native_height;
        native_width  = Customize.cust.native_width;
    }
コード例 #21
0
    static int Main()
    {
        Console.WriteLine("-------------------------------------------------------------------");
        SystemMap <Int32> y1 = new SystemMap <Int32> (5);

        Console.WriteLine("-------------------------------------------------------------------");
        SystemMap <String> y2 = new SystemMap <String> ("S");

        Console.WriteLine("-------------------------------------------------------------------");
        SystemMap <Object> y3 = new SystemMap <Object> ("S");

        Console.WriteLine("-------------------------------------------------------------------");

        if (y1.Eval() && y2.Eval() && y3.Eval())
        {
            Console.WriteLine("PASS");
            return(100);
        }
        else
        {
            Console.WriteLine("FAIL");
            return(101);
        }
    }
コード例 #22
0
ファイル: AppMan.cs プロジェクト: MrLucas265/LakeNet
    // Use this for initialization
    void Start()
    {
        System       = GameObject.Find("System");
        Applications = GameObject.Find("Applications");
        Hacking      = GameObject.Find("Hacking");
        Other        = GameObject.Find("Other");
        Computer     = GameObject.Find("Computer");
        Prompts      = GameObject.Find("Prompts");
        WindowHandel = GameObject.Find("WindowHandel");
        QA           = GameObject.Find("QA");

        winman = WindowHandel.GetComponent <WindowManager>();

        history      = Computer.GetComponent <SiteList>();
        websecviewer = Computer.GetComponent <WebSecViewer>();

        qa = QA.GetComponent <BugReport>();

        //DESKTOP ENVIROMENT
        customtheme = Computer.GetComponent <CustomTheme>();
        startmenu   = System.GetComponent <AppMenu>();
        rezprompt   = Prompts.GetComponent <RezPrompt>();
        desktop     = System.GetComponent <Desktop>();
        vc          = System.GetComponent <VolumeController>();

        //HACKING SOFTWARE
        pro             = Hacking.GetComponent <Progtive>();
        trace           = Hacking.GetComponent <Tracer>();
        dirsearch       = Hacking.GetComponent <DirSearch>();
        dicCrk          = Hacking.GetComponent <DicCrk>();
        passwordcracker = Hacking.GetComponent <PasswordCracker>();
        dirsearch       = Hacking.GetComponent <DirSearch>();

        //STOCK SYSTEMS
//		port = Applications.GetComponent<Portfolio>();
//		shareprompt = Prompts.GetComponent<SharePrompt>();

        //OTHER PROMPTS
        purchaseprompt = Prompts.GetComponent <PurchasePrompt>();

        //SYSTEM PROMPTS
        errorprompt    = Prompts.GetComponent <ErrorProm>();
        shutdownprompt = Prompts.GetComponent <ShutdownProm>();
        installprompt  = Prompts.GetComponent <InstallPrompt>();

        //SYSTEM SOFTWARE
        sysclock      = System.GetComponent <Clock>();
        cli           = System.GetComponent <CLI>();
        cliv2         = System.GetComponent <CLIV2>();
        os            = System.GetComponent <OS>();
        systempanel   = System.GetComponent <SystemPanel>();
        tasks         = System.GetComponent <TaskViewer>();
        com           = System.GetComponent <Computer>();
        diskman       = System.GetComponent <DiskMan>();
        vv            = System.GetComponent <VersionViewer>();
        fp            = System.GetComponent <FileExplorer>();
        SRM           = System.GetComponent <SystemResourceManager>();
        boot          = System.GetComponent <Boot>();
        deviceman     = System.GetComponent <DeviceManager>();
        executor      = System.GetComponent <Executor>();
        gatewayviewer = System.GetComponent <GatewayViewer>();

        //LEGAL APPLICATIONS
        email          = Applications.GetComponent <EmailClient>();
        caluclator     = Applications.GetComponent <Calculator>();
        notepad        = Applications.GetComponent <Notepad>();
        notepadv2      = Applications.GetComponent <Notepadv2>();
        accountlogs    = Applications.GetComponent <AccLog>();
        mp             = Applications.GetComponent <MusicPlayer>();
        treeview       = Applications.GetComponent <TreeView>();
        nv             = Applications.GetComponent <NotificationViewer>();
        pv             = Applications.GetComponent <PlanViewer>();
        calendar       = Applications.GetComponent <Calendar>();
        calendarv2     = Applications.GetComponent <CalendarV2>();
        eventview      = Applications.GetComponent <EventViewer>();
        exchangeviewer = Applications.GetComponent <ExchangeViewer>();

        //INTERNET BROWSERS
        internetbrowser = Applications.GetComponent <InternetBrowser>();
        edgebrowser     = Applications.GetComponent <NetViewer>();
        firefoxbrowser  = Applications.GetComponent <Firefox>();

        //APPLICATIONS
        systemMap  = Applications.GetComponent <SystemMap>();
        textreader = Applications.GetComponent <TextReader>();

        //BROWSER STUFF
        history = Computer.GetComponent <SiteList>();

        //OTHER CONNECTION DEVICE
        rv  = Applications.GetComponent <RemoteView>();
        vmd = Other.GetComponent <VMDesigner>();
    }
コード例 #23
0
    // This would be canInitWithRequest
    public static bool CanCreate(int someVar)
    {
        Master myMaster = SystemMap.getRegisteredMaster(typeof(Handler1));

        return(someVar > myMaster.someVar);
    }
コード例 #24
0
 public Time GetTime()
 {
     return(new Time(SystemMap.GetTime()));
 }
コード例 #25
0
    // Use this for initialization
    void Start()
    {
        cd = GameControl.control.BootTime;
        Kernal();

        missions = GameObject.Find("Missions");

        jd    = GetComponent <JailDew>();
        uc    = GetComponent <Unicom>();
        test  = GetComponent <Test>();
        disk  = GetComponent <CD>();
        com   = GetComponent <Computer>();
        note  = GetComponent <Notepad>();
        pro   = GetComponent <Progtive>();
        trace = GetComponent <Tracer>();
        mb    = GetComponent <MissionBrow>();
        cc    = GetComponent <CurContracts>();
        sl    = GetComponent <SiteList>();
        al    = GetComponent <AccLog>();
        ds    = GetComponent <DirSearch>();
        tv    = GetComponent <TreeView>();
        clk   = GetComponent <Clock>();
        cmd   = GetComponent <CLI> ();
        def   = GetComponent <Defalt>();
        mg    = GetComponent <MissionGen>();
        os    = GetComponent <OS>();
        sm    = GetComponent <SystemMap>();
        wsv   = GetComponent <WebSecViewer>();
        ep    = GetComponent <ErrorProm>();
        sdp   = GetComponent <ShutdownProm>();
        sp    = GetComponent <SystemPanel>();
        sc    = GetComponent <SoundControl>();
        desk  = GetComponent <Desktop>();
        ct    = GetComponent <CustomTheme>();
        mouse = GetComponent <Mouse>();
        ss    = GetComponent <ScreenSaver>();
        clic  = GetComponent <CLICommands>();

        missiongen       = missions.GetComponent <MissionGen>();
        missionbrow      = missions.GetComponent <MissionBrow>();
        currentcontracts = missions.GetComponent <CurContracts>();

        RotationCooldown = 0.01f;

        if (Application.isEditor == true)
        {
            windowRect.width  = Screen.width;
            windowRect.height = Screen.height;
        }
        else
        {
            windowRect.width  = Customize.cust.RezX;
            windowRect.height = Customize.cust.RezY;
        }

        Pos.width  = windowRect.width / 2;
        Pos.height = windowRect.height / 2;

        windowRect.x = 0;
        windowRect.y = 0;

        x = Pos.width - 30;
        y = Pos.height;

        GameControl.control.GUIID = Customize.cust.GUIID;

        StartTimer = 0.01f;

        PlaySoundOnce = false;

        LoadPresetColors();

        missiongen.enabled       = true;
        missionbrow.enabled      = true;
        currentcontracts.enabled = true;
    }
コード例 #26
0
ファイル: Defalt.cs プロジェクト: MrLucas265/LakeNet
    void ProgramSetup()
    {
        AppSoftware     = GameObject.Find("Applications");
        QA              = GameObject.Find("QA");
        HackingSoftware = GameObject.Find("Hacking");
        SysSoftware     = GameObject.Find("System");
        Computer        = GameObject.Find("Computer");
        Other           = GameObject.Find("Other");
        Missions        = GameObject.Find("Missions");

        qa = QA.GetComponent <BugReport>();

        //mb = GetComponent<MissionBrow>();
        sl  = Computer.GetComponent <SiteList>();
        wsv = Computer.GetComponent <WebSecViewer>();

        //Hacking Software
        pro     = HackingSoftware.GetComponent <Progtive>();
        trace   = HackingSoftware.GetComponent <Tracer>();
        ds      = HackingSoftware.GetComponent <DirSearch>();
        dc      = HackingSoftware.GetComponent <DicCrk>();
        passcrk = HackingSoftware.GetComponent <PasswordCracker>();

        //System Sofware
        dsk   = SysSoftware.GetComponent <Desktop>();
        com   = SysSoftware.GetComponent <Computer>();
        ss    = SysSoftware.GetComponent <ScreenSaver>();
        sp    = SysSoftware.GetComponent <SystemPanel>();
        am    = SysSoftware.GetComponent <AppMenu>();
        tasks = SysSoftware.GetComponent <TaskViewer>();
        clk   = SysSoftware.GetComponent <Clock>();
        cmd   = SysSoftware.GetComponent <CLI>();
        cmd2  = SysSoftware.GetComponent <CLIV2>();
        os    = SysSoftware.GetComponent <OS>();
        dm    = SysSoftware.GetComponent <DiskMan>();
        mouse = SysSoftware.GetComponent <Mouse>();
        fp    = SysSoftware.GetComponent <FileExplorer>();
        dem   = SysSoftware.GetComponent <DeviceManager>();
        vc    = SysSoftware.GetComponent <VolumeController>();

        //Application Softwate
        //        port = AppSoftware.GetComponent<Portfolio>();
        tr     = AppSoftware.GetComponent <TextReader>();
        sm     = AppSoftware.GetComponent <SystemMap>();
        al     = AppSoftware.GetComponent <AccLog>();
        note   = AppSoftware.GetComponent <Notepad>();
        notev2 = AppSoftware.GetComponent <Notepadv2>();
        cc     = AppSoftware.GetComponent <EmailClient>();
        tv     = AppSoftware.GetComponent <TreeView>();
        nv     = AppSoftware.GetComponent <NotificationViewer>();
        pv     = AppSoftware.GetComponent <PlanViewer>();
        //calendar = AppSoftware.GetComponent<Calendar>();
        calendarv2   = AppSoftware.GetComponent <CalendarV2>();
        eventview    = AppSoftware.GetComponent <EventViewer>();
        exchangeview = AppSoftware.GetComponent <ExchangeViewer>();

        // Application Browsers
        ib  = AppSoftware.GetComponent <InternetBrowser>();
        eib = AppSoftware.GetComponent <NetViewer>();
        fib = AppSoftware.GetComponent <Firefox>();
        rv  = AppSoftware.GetComponent <RemoteView>();
        cal = AppSoftware.GetComponent <Calculator>();
        mp  = AppSoftware.GetComponent <MusicPlayer>();



        // Prompts
        ip  = Prompts.GetComponent <InstallPrompt>();
        pp  = Prompts.GetComponent <PurchasePrompt>();
        ep  = Prompts.GetComponent <ErrorProm>();
        sdp = Prompts.GetComponent <ShutdownProm>();
        rp  = Prompts.GetComponent <RezPrompt>();
//		shareprompt = Prompts.GetComponent<SharePrompt>();
        notiprompt = Prompts.GetComponent <NotfiPrompt>();

        //OTHER
        vmd = Other.GetComponent <VMDesigner>();

        // Computer
        ct = Computer.GetComponent <CustomTheme>();

        //Missions
        misgen = Missions.GetComponent <MissionGen>();
    }
コード例 #27
0
        public void getUserScans(int _userId, Ship _ship, ref List <Ship> _ships, ref List <SpacegameServer.Core.SystemMap> _stars, ref List <SpacegameServer.Core.Colony> _colonies, Colony scanningColony = null)
        {
            if (_userId < 0)
            {
                return;
            }
            SpacegameServer.Core.User user = (SpacegameServer.Core.User)users[_userId];
            if (user == null)
            {
                return;
            }


            //during startup, add all colonies of stars known to the user
            if (_ship == null && scanningColony == null)
            {
                _colonies = Core.Instance.stars.Where(star => user.knownStars.Any(known => known == star.Value.id))
                            .SelectMany(star => star.Value.planets)
                            .Where(planet => planet.colony != null)
                            .Select(planet => planet.colony).ToList();

                /*foreach (int starId in user.knownStars)
                 * {
                 *  if (Core.Instance.stars[starId].planets.Any(planet => planet.colony != null))
                 *  {
                 *      _colonies = Core.Instance.stars[starId].planets.Where(planet => planet.colony != null).Select(planet => planet.colony).ToList();
                 *  }
                 * }
                 */
            }


            //make a list with unique fields, only the scanner with the greates scanrange is needed
            Dictionary <Int32, KeyValuePair <Field, byte> > fieldScans = new Dictionary <int, KeyValuePair <Field, byte> >();

            if (_ship != null || scanningColony != null)
            {
                if (_ship != null)
                {
                    fieldScans[_ship.field.id] = new KeyValuePair <Field, byte>(_ship.field, _ship.scanRange);
                }

                if (scanningColony != null)
                {
                    fieldScans[scanningColony.field.id] = new KeyValuePair <Field, byte>(scanningColony.field, scanningColony.scanRange);
                }
            }
            else
            {
                for (int i = 0; i < user.ships.Count; i++)
                {
                    Ship currentShip = user.ships[i];
                    KeyValuePair <Field, byte> val;
                    if (fieldScans.TryGetValue(user.ships[i].field.id, out val))
                    {
                        if (val.Value < currentShip.scanRange)
                        {
                            fieldScans[currentShip.field.id] = new KeyValuePair <Field, byte>(currentShip.field, currentShip.scanRange);
                        }
                    }
                    else
                    {
                        fieldScans[currentShip.field.id] = new KeyValuePair <Field, byte>(currentShip.field, currentShip.scanRange);
                    }
                }

                for (int i = 0; i < user.colonies.Count; i++)
                {
                    Colony currentColony = user.colonies[i];
                    KeyValuePair <Field, byte> val;

                    if (fieldScans.TryGetValue(currentColony.field.id, out val))
                    {
                        if (val.Value < currentColony.scanRange)
                        {
                            fieldScans[currentColony.field.id] = new KeyValuePair <Field, byte>(currentColony.field, currentColony.scanRange);
                        }
                    }
                    else
                    {
                        fieldScans[currentColony.field.id] = new KeyValuePair <Field, byte>(currentColony.field, currentColony.scanRange);
                    }
                }
            }
            //find all neighbouring fields of the scanners
            //use the regions to accomplish this
            List <int> scannedFields = new List <int>();

            foreach (KeyValuePair <Int32, KeyValuePair <Field, byte> > scanner in fieldScans)
            {
                scanner.Value.Key.getScanRange(scanner.Value.Value, scannedFields);
            }

            //detect all ships, stars and colonies on the fields scanned
            foreach (int fieldId in (scannedFields.Distinct()))
            {
                Field currentField = ((Field)GeometryIndex.allFields[fieldId]);
                foreach (Ship ship in currentField.ships)
                {
                    _ships.Add(ship);
                }

                _ships = _ships.OrderBy(o => o.id).ToList();

                if (currentField.starId != null)
                {
                    int       starId = (int)currentField.starId;
                    SystemMap star   = stars[starId];
                    _stars.Add(star);

                    foreach (Colony colony in currentField.colonies)
                    {
                        if (!_colonies.Any(c => c == colony))
                        {
                            _colonies.Add(colony);
                        }
                    }

                    //if scan is determined for a single ship, check if that user already kwos the systems scanned:
                    if ((_ship != null) && !user.knownStars.Contains(starId))
                    {
                        user.knownStars.Add(starId);
                        UserStarMap newStar = new UserStarMap(user.id, starId);

                        List <AsyncInsertable> newKnownStar = new List <AsyncInsertable>();
                        newKnownStar.Add(newStar);

                        dataConnection.insertAsyncTransaction(newKnownStar);
                    }
                }
            }


            //add usermap and transcensionStars to the list of known stars:
            if (_ship == null && scanningColony == null)
            {
                foreach (int starId in user.knownStars)
                {
                    if (!_stars.Exists(x => x.id == starId))
                    {
                        _stars.Add(this.stars[starId]);
                    }
                }

                List <Ship> transcensions =
                    (from ship in this.ships
                     where ship.Value.shipTranscension != null
                     select ship.Value).ToList();
                foreach (Ship transc in transcensions)
                {
                    if (transc.systemId == 0)
                    {
                        continue;
                    }
                    if (!_stars.Exists(x => x.id == transc.systemId))
                    {
                        _stars.Add(this.stars[transc.systemId]);
                    }
                }
            }

            return;
        }