Ejemplo n.º 1
0
 // Update is called once per frame
 void Update()
 {
     actualGoldValue.text = stats.gold.ToString();
     if (engMng == null)
     {
         engMng = GameObject.FindGameObjectWithTag("MainShip").GetComponent <EnginesManager>();
         return;
     }
     else if (!isInit)
     {
         Initialize();
     }
     else
     {
         powerImg.fillAmount   = powerEng.level / 10f;
         navImg.fillAmount     = navEng.level / 10f;
         weaponImg.fillAmount  = weaponEng.level / 10f;
         repairImg.fillAmount  = repairEng.level / 10f;
         medicImg.fillAmount   = medicEng.level / 10f;
         powerImg2.fillAmount  = powerEng.level / 10f;
         navImg2.fillAmount    = navEng.level / 10f;
         weaponImg2.fillAmount = weaponEng.level / 10f;
         repairImg2.fillAmount = repairEng.level / 10f;
         medicImg2.fillAmount  = medicEng.level / 10f;
     }
 }
Ejemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        playerMvntSCR = GetComponent <PlayerMovement>();
        globalMap     = GameObject.FindGameObjectWithTag("Manager").GetComponent <ShipMap>();
        if (isAlly)
        {
            engineMng = GameObject.FindGameObjectWithTag("MainShip").GetComponent <EnginesManager>();
        }
        else
        {
            engineMng = GameObject.FindGameObjectWithTag("Enemy").GetComponent <EnginesManager>();
        }
        medicEngine = engineMng.GetEngine(Engine.engineType.medic);
        if (medicEngine == null)
        {
            StartCoroutine(initCrt());
            return;
        }
        Vector3 medicPos = globalMap.GetEnginePos(Engine.engineType.medic, isAlly);

        foreach (ShipCell cell in globalMap.GetRoomByPos(medicPos).cells)
        {
            medicsPos.Add(cell.position);
        }
        StartCoroutine(RepairCoroutine());
        StartCoroutine(OperateCrt());
    }
Ejemplo n.º 3
0
    // Use this for initialization
    void Start()
    {
        shipMap        = GameObject.FindGameObjectWithTag("Manager").GetComponent <ShipMap>();
        enginesManager = GetComponent <EnginesManager>();

        Initialize();
        lastPosition    = transform.position;
        shipMap.shipMap = map;
    }
Ejemplo n.º 4
0
        public static void init(Container container)
        {
            logger = EngineFrameworkLoggerFactory.CreateLogger(typeof(AgentController));
            logger.LogInformation("Logger Config Set.");

            container.Config();
            logger.LogInformation("DI Config Set.");

            _enginesManager = new EnginesManager();

            foreach (var engine in AppSettings.EngineNames)
            {
                var temp = Container.Resolve <BaseEngine>(engine);
                if (temp != null)
                {
                    _enginesManager.AddEngine(temp);
                }
            }

            //_enginesManager.AddEngine(Container.Resolve<StatementEngine>());
            logger.LogInformation("Engines Add.");
        }
Ejemplo n.º 5
0
    // Use this for initialization
    void Start()
    {
        shipMap = GameObject.FindGameObjectWithTag("Manager").GetComponent<ShipMap>();
        enginesManager = GetComponent<EnginesManager>();

        Initialize();
        lastPosition = transform.position;
        shipMap.shipMap = map;
    }
Ejemplo n.º 6
0
    // Use this for initialization
    void Start()
    {
        playerMvntSCR = GetComponent<PlayerMovement>();
        globalMap = GameObject.FindGameObjectWithTag("Manager").GetComponent<ShipMap>();
        if (isAlly)
        {
            engineMng = GameObject.FindGameObjectWithTag("MainShip").GetComponent<EnginesManager>();
        }
        else
        {
            engineMng = GameObject.FindGameObjectWithTag("Enemy").GetComponent<EnginesManager>();
        }
        medicEngine = engineMng.GetEngine(Engine.engineType.medic);
        if (medicEngine == null)
        {
            StartCoroutine(initCrt());
            return;

        }
        Vector3 medicPos = globalMap.GetEnginePos(Engine.engineType.medic, isAlly);
        foreach (ShipCell cell in globalMap.GetRoomByPos(medicPos).cells)
        {
            medicsPos.Add(cell.position);
        }
        StartCoroutine(RepairCoroutine());
        StartCoroutine(OperateCrt());
    }
 // Update is called once per frame
 void Update()
 {
     actualGoldValue.text = stats.gold.ToString();
     if (engMng == null)
     {
         engMng = GameObject.FindGameObjectWithTag("MainShip").GetComponent<EnginesManager>();
         return;
     }
     else if (!isInit)
     {
         Initialize();
     }
     else
     {
         powerImg.fillAmount = powerEng.level / 10f;
         navImg.fillAmount = navEng.level / 10f;
         weaponImg.fillAmount = weaponEng.level / 10f;
         repairImg.fillAmount = repairEng.level / 10f;
         medicImg.fillAmount = medicEng.level / 10f;
         powerImg2.fillAmount = powerEng.level / 10f;
         navImg2.fillAmount = navEng.level / 10f;
         weaponImg2.fillAmount = weaponEng.level / 10f;
         repairImg2.fillAmount = repairEng.level / 10f;
         medicImg2.fillAmount = medicEng.level / 10f;
     }
 }