//==========================================================================================================// /// <summary> /// Define as configurações iniciais do alvo. /// </summary> //==========================================================================================================// void Start() { dirX = 0.1f; dirY = 0.1f; vel = instance.CSV_GetVelocidadeAlvos(); tam = instance.CSV_GetTamanhoAlvos(); cor = this.GetComponent <Renderer>().material.color; SerializedObject halo = new SerializedObject(GetComponent("Halo")); halo.FindProperty("m_Size").floatValue = 0.8f; halo.FindProperty("m_Enabled").boolValue = true; halo.FindProperty("m_Color").colorValue = cor; halo.ApplyModifiedProperties(); }
//==========================================================================================================// /// <summary> /// Define as configurações iniciais do alvo. /// </summary> //==========================================================================================================// void Start() { dirX = 0.1f; dirY = 0.1f; vel = instance.CSV_GetVelocidadeAlvos(); tam = instance.CSV_GetTamanhoAlvos(); //cor = Color.red; //SerializedObject halo = new SerializedObject(GetComponent("Halo")); //halo.FindProperty("m_Size").floatValue = 0.8f; //halo.FindProperty("m_Enabled").boolValue = true; //halo.FindProperty("m_Color").colorValue = Color.red; //halo.ApplyModifiedProperties(); //GetComponent<Rigidbody2D>().velocity = new Vector2(0.02f, 0.02f); }