Exemple #1
0
    private void Setup()
    {
        sysScr   = GetComponent <SystemScript>();
        gridPos  = sysScr.GridPos;
        playerID = gridPos.Z;

        ship    = LevelManager.Instance.Ships[playerID].GetComponent <ShipScript>();
        pwrMngr = ship.GetComponent <ShipPowerMngr>();

        hScr = sysScr.GetOriginObj().GetComponent <HealthScript>();

        //ship.IncreaseEvasionChance (componentCapacity);

        pwrMngr.PowerSetup(systemType, powerReq);

        originTeleporterScr = GetOriginTelScr();
        if (this == originTeleporterScr)
        {
            isOrigin = true;
        }

        originTeleporterScr.fullPwrReq += powerReq;

        if (isOrigin)
        {
            pwrMngr.AddToSysScrList(systemType, sysScr);
        }

        RoomScript _room = transform.parent.parent.GetChild(0).GetChild(0).GetComponent <RoomScript>();

        room = _room.GetOriginObj().GetComponent <RoomScript>();
    }
Exemple #2
0
    private void Setup()
    {
        sysScr   = GetComponent <SystemScript>();
        gridPos  = sysScr.GridPos;
        playerID = gridPos.Z;

        ship    = LevelManager.Instance.Ships[playerID].GetComponent <ShipScript>();
        pwrMngr = ship.GetComponent <ShipPowerMngr>();

        hScr = sysScr.GetOriginObj().GetComponent <HealthScript>();

        pwrMngr.PowerSetup(systemType, powerReq);


        originMedBayScr = GetOriginMedBay();
        if (this == originMedBayScr)
        {
            isOrigin = true;
        }

        //originEngScr.fullPwrReq += powerReq;

        if (isOrigin)
        {
            pwrMngr.AddToSysScrList(systemType, sysScr);

            StartCoroutine(HealRoutine());
        }
    }
Exemple #3
0
    private void Setup()
    {
        sysScr   = GetComponent <SystemScript>();
        gridPos  = sysScr.GridPos;
        playerID = gridPos.Z;

        ship    = LevelManager.Instance.Ships [playerID].GetComponent <ShipScript> ();
        pwrMngr = ship.GetComponent <ShipPowerMngr> ();

        hScr = sysScr.GetOriginObj().GetComponent <HealthScript> ();

        //ship.IncreaseEvasionChance (componentCapacity);

        pwrMngr.PowerSetup(systemType, powerReq);

        originEngScr = GetOriginEngine();
        if (this == originEngScr)
        {
            isOrigin = true;
        }

        originEngScr.fullPwrReq += powerReq;

        if (isOrigin)
        {
            pwrMngr.AddToSysScrList(systemType, sysScr);
        }

        /* 220418
         * if (NetManager.Instance != null) {
         *      if (playerID == NetManager.Instance.localPlayerID) {
         *              PowerManager.Instance.GetEngine (this);
         *              PowerManager.Instance.UpdateSystemCapacity (systemType, powerReq);
         *              isLocal = true;
         *      }
         * }
         */
    }
Exemple #4
0
    private void Setup()
    {
        sysScr   = GetComponent <SystemScript> ();
        gridPos  = sysScr.GridPos;
        playerID = gridPos.Z;

        ship    = LevelManager.Instance.Ships [playerID].GetComponent <ShipScript> ();
        pwrMngr = ship.GetComponent <ShipPowerMngr> ();

        hScr = sysScr.GetOriginObj().GetComponent <HealthScript> ();

        //ship.IncreaseEvasionChance (componentCapacity);

        pwrMngr.PowerSetup(systemType, powerReq);

        weaponSysScr = GetOriginWeaponSys();
        if (this == weaponSysScr)
        {
            isOrigin = true;
            pwrMngr.AddToSysScrList(systemType, sysScr);
        }

        weaponSysScr.fullPwrReq += powerReq;
    }
Exemple #5
0
    void Start()
    {
        ShipScript _ship = LevelManager.Instance.Ships [0].GetComponent <ShipScript> ();

        pwrMngr = _ship.GetComponent <ShipPowerMngr> ();
    }