// Use this for initialization void Start() { is_selected = false; a_boat_script = (boat_script)boat.GetComponent(typeof(boat_script)); global_event_script = global_event_handle.GetComponent <global_event_script>(); original_color = this.transform.Find("Seagull").gameObject.GetComponent <Renderer>().material.color; }
// Use this for initialization void Start() { is_selected = false; a_boat_script = (boat_script)boat.GetComponent(typeof(boat_script)); global_event_script = global_event_handle.GetComponent <global_event_script>(); original_texture = (Texture2D)gameObject.GetComponent <Renderer>().material.mainTexture; init_time = Time.time; targetTexture = new Texture2D(original_texture.width, original_texture.height); for (int y = 0; y < original_texture.height; y++) { for (int x = 0; x < original_texture.width; x++) { Color c = Color.red; targetTexture.SetPixel(x, y, c); } } }
public void set_boat_speed(float speed) { boat_script a_boat_script = (boat_script)boat.GetComponent(typeof(boat_script)); a_boat_script.rotate_speed = speed; }