public virtual void Awake() { area = transform.GetChild(0).gameObject; box = GetComponent <BoxCollider2D>(); an = GetComponent <Animator>(); visual = GetComponent <AreaVisual>(); }
public override void OnValidate() { base.OnValidate(); AreaVisual av = GetComponent <AreaVisual>(); foreach (Transform action in actions) { action.GetComponent <AreaVisual>().SetColor(av.areaColor); } av.SetAreaName(RoomName); }