public void Initialize(T3 p_dna, T2 p_controller)
    {
        m_is_initialized = true;
        m_dna            = p_dna.Clone();

        T4 mindbody = p_dna.express(getSelf());

        m_traits = mindbody.m_body;
        m_health = new LimitedNumber(m_traits["HEALTH"]);

        // Debug.Log(mindbody.m_mind);
        InitializeBrain(mindbody.m_mind);

        m_controller = p_controller;
    }
    //----------------------------------------------------------
    //Construction

    public void Initialize(MindBodyDNDNA <ResourceFightDNCreature> p_dna, ResourceFightGameController p_controller)
    {
        m_is_initialized = true;
        ObjectLogger.log(gameObject, "CREATURE");

        m_dna = p_dna.Clone();

        MindBodyDN mindbody = p_dna.express(this);

        m_traits = mindbody.m_body;
        InitializeBrain(mindbody.m_mind);

        m_health       = new LimitedNumber(m_traits["HEALTH"] * 5);
        m_energy       = new LimitedNumber(m_traits["ENERGY"] * 10);
        m_speed        = m_traits["SPEED"];
        m_damage       = m_traits["DAMAGE"];
        m_attack_speed = m_traits["ATTACKSPEED"];

        m_controller = p_controller;
    }
예제 #3
0
 public void Initalize(float m_total_energy)
 {
     m_resource_left      = new LimitedNumber(m_total_energy);
     m_resource_left_text = transform.GetChild(0).GetComponent <TextMesh>();
     UpdateText();
 }