UnitController.Activate C# (CSharp) 메소드

Activate() 공개 메소드

public Activate ( ) : void
리턴 void
    public void Activate()
    {
        m_active = true;
        m_hasMoved = false;
        m_hasAttacked = false;
        UpdateButtonStatus();
        GetComponent<UnitGUIController>().EnableGUI();
    }

Usage Example

예제 #1
0
    public void RunBest()
    {
        Time.timeScale = 1;

        NeatGenome genome = null;


        // Try to load the genome from the XML document.
        try
        {
            using (XmlReader xr = XmlReader.Create(champFileSavePath))
                genome = NeatGenomeXmlIO.ReadCompleteGenomeList(xr, false, (NeatGenomeFactory)experiment.CreateGenomeFactory())[0];
        }
        catch (Exception e1)
        {
            // print(champFileLoadPath + " Error loading genome from file!\nLoading aborted.\n"
            //						  + e1.Message + "\nJoe: " + champFileLoadPath);
            return;
        }

        // Get a genome decoder that can convert genomes to phenomes.
        var genomeDecoder = experiment.CreateGenomeDecoder();

        // Decode the genome into a phenome (neural network).
        var phenome = genomeDecoder.Decode(genome);

        GameObject     obj        = Instantiate(Unit, Unit.transform.position, Unit.transform.rotation) as GameObject;
        UnitController controller = obj.GetComponent <UnitController>();

        ControllerMap.Add(phenome, controller);

        controller.Activate(phenome);
    }
All Usage Examples Of UnitController::Activate