UnityEditor.SerializedObject dlb_halo; // effet d'une aura autour du joueur pour indiquer si il est sous l'effet d'un bonus void Start() { dlb_gameManager = GameObject.Find("GameManager").GetComponent <dlb_GameManager>(); dlb_rb = GetComponent <Rigidbody2D>(); dlb_halo = new SerializedObject(gameObject.GetComponent("Halo")); // dlb_halo = (Behaviour)GetComponent("Halo"); }
void Start() { dlb_gameManager = GameObject.Find("GameManager").GetComponent <dlb_GameManager>(); cam = Camera.main; height = cam.orthographicSize; width = height * cam.aspect; dlb_speed = Random.Range(dlb_minSpeed, dlb_maxSpeed); dlb_rb = GetComponent <Rigidbody2D>(); dlb_boundsAttackArea = dlb_gameManager.dlb_attackArea.GetComponent <BoxCollider2D>().bounds; }